From 0e6cc507804efc802e41d4ff213b2db74a6fe799 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Sun, 24 Oct 2021 16:56:21 -0700 Subject: [PATCH] Fix version check With the previous float casting Python 3.10 did not pass anymore when it should be fine. --- mavsdk/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mavsdk/__init__.py b/mavsdk/__init__.py index 5ef3dbb9..f5d463d7 100644 --- a/mavsdk/__init__.py +++ b/mavsdk/__init__.py @@ -7,7 +7,8 @@ from .system import System # Check for compatibility -if float(".".join(platform.python_version_tuple()[0:-1])) < 3.6: +(major, minor, _) = platform.python_version_tuple() +if not ((int(major) >= 3 and int(minor) >= 6) or (int(major) >= 4)): print("[!] MAVSDK-Python is only available on Python >= 3.6") sys.exit(1)