1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-10 00:58:23 +03:00

Fixed interpretation of boolean values

This commit is contained in:
Valery Sinelnikov 2025-01-14 12:08:15 +04:00
parent 67a02a4623
commit 408d221c3d

View File

@ -116,7 +116,7 @@ def create_dict(firefox_keys, registry_branch, excp=list()):
'''
Collect dictionaries from registry keys into a general dictionary
'''
get_boolean = lambda data: data in ['0', 'false', None, 'none', 0] if isinstance(data, (str, int)) else False
get_boolean = lambda data: data in ['1', 'true', 'True', True, 1] if isinstance(data, (str, int)) else False
get_parts = lambda hivekey, registry: hivekey.replace(registry, '').split('/')
counts = dict()
for it_data in firefox_keys: