From 0d88a9d909b4fc40fc481988442fedf5e38be07b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 15 Nov 2024 12:34:05 +0100 Subject: [PATCH] fix: Avoid exception on dev releases --- pymisp/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymisp/api.py b/pymisp/api.py index 80adaab..0230bf6 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -216,8 +216,8 @@ class PyMISP: if 'errors' in response: logger.warning(response['errors'][0]) else: - pymisp_version_tup = tuple(int(x) for x in __version__.split('.')) - recommended_version_tup = tuple(int(x) for x in response['version'].split('.')) + pymisp_version_tup = tuple(int(x) for x in __version__.split('.')[:3]) + recommended_version_tup = tuple(int(x) for x in response['version'].split('.')[:3]) if recommended_version_tup < pymisp_version_tup[:3]: logger.info(f"The version of PyMISP recommended by the MISP instance ({response['version']}) is older than the one you're using now ({__version__}). If you have a problem, please upgrade the MISP instance or use an older PyMISP version.") elif pymisp_version_tup[:3] < recommended_version_tup: