1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Updated get_key_values ​​method

This commit is contained in:
Данила Скачедубов 2024-01-16 18:43:39 +04:00 committed by Valery Sinelnikov
parent 54eb4188a7
commit 51c8711da6

View File

@ -113,17 +113,8 @@ class Dconf_registry():
@staticmethod
def get_key_values(keys):
key_values = {}
try:
for key in keys:
process = subprocess.Popen(['dconf', 'read', key],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
output, error = process.communicate()
if not error:
key_values[key] = string_to_literal_eval(string_to_literal_eval(output))
except Exception as exc:
#log
...
for key in keys:
key_values[key] = Dconf_registry.get_key_value(key)
return key_values
@staticmethod