mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added class method for getting dconf keys
This commit is contained in:
parent
bd5262353b
commit
666c88bdf1
@ -175,6 +175,18 @@ class Dconf_registry():
|
||||
f.write(content)
|
||||
|
||||
|
||||
@classmethod
|
||||
def get_dictionary_from_dconf(self, startswith):
|
||||
output_dict = {}
|
||||
dconf_dict = self.get_key_values(self.get_matching_keys(startswith))
|
||||
|
||||
for key, value in dconf_dict.items():
|
||||
keys_tmp = key.split('/')
|
||||
output_dict.setdefault('/'.join(keys_tmp[0:-1])[1:], {})[keys_tmp[-1]] = value
|
||||
|
||||
return output_dict
|
||||
|
||||
|
||||
@classmethod
|
||||
def filter_entries(self, startswith):
|
||||
if startswith[-1] == '%':
|
||||
|
Loading…
x
Reference in New Issue
Block a user