From eebbcfbbdf35b73b60be35106c82100c9cc990bc Mon Sep 17 00:00:00 2001 From: Rojo Date: Sat, 30 Oct 2021 20:55:52 +0200 Subject: [PATCH] Fixes Python version check This fixes the Python version check. float() cuts trailing zeroes: ```python import sys ``` --- cloudflare-ddns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudflare-ddns.py b/cloudflare-ddns.py index 12e22bc..b4f0f7e 100755 --- a/cloudflare-ddns.py +++ b/cloudflare-ddns.py @@ -181,14 +181,14 @@ def updateIPs(ips): commitRecord(ip) if __name__ == '__main__': - version = float(str(sys.version_info[0]) + "." + str(sys.version_info[1])) + version = int(str(sys.version_info[0]) + str(sys.version_info[1])) shown_ipv4_warning = False shown_ipv6_warning = False ipv4_enabled = True ipv6_enabled = True purgeUnknownRecords = False - if(version < 3.5): + if(version < 35): raise Exception("🐍 This script requires Python 3.5+") config = None