Skip to content

Commit f49410b

Browse files
committed
fix: Avoid exception on dev releases
1 parent 26fbac0 commit f49410b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymisp/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def __init__(self, url: str, key: str, ssl: bool | str = True, debug: bool = Fal
216216
if 'errors' in response:
217217
logger.warning(response['errors'][0])
218218
else:
219-
pymisp_version_tup = tuple(int(x) for x in __version__.split('.'))
220-
recommended_version_tup = tuple(int(x) for x in response['version'].split('.'))
219+
pymisp_version_tup = tuple(int(x) for x in __version__.split('.')[:3])
220+
recommended_version_tup = tuple(int(x) for x in response['version'].split('.')[:3])
221221
if recommended_version_tup < pymisp_version_tup[:3]:
222222
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.")
223223
elif pymisp_version_tup[:3] < recommended_version_tup:

0 commit comments

Comments
 (0)