forked from Sysdeploy/idlers-agent
refractor
This commit is contained in:
parent
5316b0fb07
commit
4480a3361f
4
agent.py
4
agent.py
|
@ -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():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user