mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added functions for verification and request in the dictionary
This commit is contained in:
parent
b244df8f2d
commit
0d1b60158a
@ -135,6 +135,17 @@ class Dconf_registry():
|
||||
with open(user_mandatory, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
def filter_dict_keys(starting_string, input_dict):
|
||||
return {key: input_dict[key] for key in input_dict if key.startswith(starting_string)}
|
||||
|
||||
def has_single_key_with_value(input_dict):
|
||||
|
||||
if not input_dict or len(input_dict) == 0:
|
||||
return False
|
||||
elif len(input_dict) == 1 and list(input_dict.values())[0] is None:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def update_dict(dict1, dict2):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user