created os_version function, renamed functions with ambiguous names

This commit is contained in:
mjkantti
2024-01-21 13:06:18 +09:00
parent 9017d65152
commit 3f7dd92407
3 changed files with 18 additions and 15 deletions

View File

@@ -324,8 +324,8 @@ def parse_ros_version(string):
version, channel = re.findall(r'([\d\.]+).*?([\w]+)', string)[0]
return packaging.version.parse(version), channel
def is_wifi_version(string):
"""Try to check if the version is Wifi version of RouterOS (> 7.13).
def builtin_wifi_capsman_version(string):
"""Try to check if the version is Wifi version of RouterOS (>= 7.13).
If anything goes wrong, return None.
Returns a boolean"""
try:
@@ -334,6 +334,7 @@ def is_wifi_version(string):
return True
except Exception as err:
print(f'could not get current RouterOS version, because: {str(err)}')
return None
return False