mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +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
|
||||
"""
|
||||
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]
|
||||
compat_list = ', '.join(compatible)
|
||||
warning_message(f'{mod} parser not compatible with your OS ({sys.platform}).\n Compatible platforms: {compat_list}')
|
||||
|
Reference in New Issue
Block a user