From 3d0bb45ccf0bf47f48eafc706a110310e58dfeae Mon Sep 17 00:00:00 2001 From: nkmry Date: Wed, 8 Dec 2021 22:15:58 +0900 Subject: [PATCH] fix how to handle the Python version in cli.py the previous code doesn't handle `3.10` because float('3.10') == 3.1 < 3.6 --- twint/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twint/cli.py b/twint/cli.py index f463d687..7fa7bf07 100644 --- a/twint/cli.py +++ b/twint/cli.py @@ -331,8 +331,8 @@ def main(): def run_as_command(): - version = ".".join(str(v) for v in sys.version_info[:2]) - if float(version) < 3.6: + version = sys.version_info[:2] + if version[0] < 3 or (version[0] == 3 and version[1] < 6): print("[-] TWINT requires Python version 3.6+.") sys.exit(0)