refractor

This commit is contained in:
Shailaja Kumari 2024-07-05 19:34:12 +05:30
parent 5316b0fb07
commit 4480a3361f
Signed by: shailaja
GPG Key ID: 2B9455CAFBC4D75A

View File

@ -274,9 +274,9 @@ class ServerData:
return 1 return 1
if 'ID' in os_info and 'VERSION_ID' in os_info: if 'ID' in os_info and 'VERSION_ID' in os_info:
current_os = f"{os_info.get('NAME', 'Unknown')} {os_info.get('VERSION', '').strip()}".strip() current_os = (os_info.get('ID', 'Unknown') + " " + os_info.get('VERSION_ID', '').strip()).strip()
else: else:
current_os = f"{os_info.get('os_name', 'Unknown')} {os_info.get('productversion', '').strip()}".strip().lower() current_os = (os_info.get('os_name', 'Unknown') +" " os_info.get('productversion', '').strip()).strip().lower()
for os_entry in os_list: for os_entry in os_list:
if current_os in os_entry['name'].lower(): if current_os in os_entry['name'].lower():