mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added class method to get the key
This commit is contained in:
parent
11b33dd148
commit
b81a727cd4
@ -125,6 +125,20 @@ class Dconf_registry():
|
||||
...
|
||||
return key_values
|
||||
|
||||
@staticmethod
|
||||
def get_key_value(key):
|
||||
try:
|
||||
process = subprocess.Popen(['dconf', 'read', key],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
||||
output, error = process.communicate()
|
||||
|
||||
if not error:
|
||||
key = string_to_literal_eval(string_to_literal_eval(output))
|
||||
except Exception as exc:
|
||||
#log
|
||||
...
|
||||
return key
|
||||
|
||||
@staticmethod
|
||||
def dconf_update():
|
||||
try:
|
||||
@ -235,6 +249,11 @@ class Dconf_registry():
|
||||
return result
|
||||
|
||||
|
||||
@classmethod
|
||||
def filling_storage_from_dconf(self):
|
||||
Dconf_registry.global_registry_dict = Dconf_registry.get_storage()
|
||||
|
||||
|
||||
@classmethod
|
||||
def get_entry(self, path, dictionary = None):
|
||||
result = Dconf_registry.get_storage(dictionary)
|
||||
|
Loading…
x
Reference in New Issue
Block a user