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:
parent
54eb4188a7
commit
51c8711da6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user