Improve version check

... to not break on e.g. 4.0

Change-Id: I5b93f6138a5ca85891d2d60beca098b6bcfc15d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134435
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski 2022-05-17 13:28:33 +02:00
parent 01c1467055
commit 28c82b4a01

View file

@ -78,7 +78,7 @@ def add_tests_for_file(test_file, test_suite):
loader = importlib.machinery.SourceFileLoader(module_name, test_file)
# exec_module was only introduced in 3.4
if sys.version_info[1] < 4:
if sys.version_info < (3,4):
mod = loader.load_module()
else:
mod = types.ModuleType(loader.name)