mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
fix compatibility search for platform names that append the version number (e.g. freebsd12)
This commit is contained in:
@ -56,7 +56,14 @@ def compatibility(mod_name, compatible):
|
|||||||
|
|
||||||
no return, just prints output to STDERR
|
no return, just prints output to STDERR
|
||||||
"""
|
"""
|
||||||
if sys.platform not in compatible:
|
platform_found = False
|
||||||
|
|
||||||
|
for platform in compatible:
|
||||||
|
if platform.startswith(sys.platform):
|
||||||
|
platform_found = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if not platform_found:
|
||||||
mod = mod_name.split('.')[-1]
|
mod = mod_name.split('.')[-1]
|
||||||
compat_list = ', '.join(compatible)
|
compat_list = ', '.join(compatible)
|
||||||
warning_message(f'{mod} parser not compatible with your OS ({sys.platform}).\n Compatible platforms: {compat_list}')
|
warning_message(f'{mod} parser not compatible with your OS ({sys.platform}).\n Compatible platforms: {compat_list}')
|
||||||
|
Reference in New Issue
Block a user