Skip to content

Commit a6bbf9d

Browse files
authored
Merge pull request #16 from aanderse/issue-15
fix case sensitivity issue when parsing registry.vdf on linux
2 parents ded5c2e + e9817e1 commit a6bbf9d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

resources/registry.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ def get_registry_values(registry_path):
7575
with open(registry_path, 'r') as file:
7676
vdf = vdf_parse(file, {})
7777
apps = vdf['Registry']['HKCU']['Software']['Valve']['Steam']['Apps']
78-
app_dict = dict((k, v) for (k, v) in apps.iteritems() if v.get('installed', '0') == '1')
78+
79+
# apparently case of 'installed' differs depending on ... ?
80+
# i'm sure if i were a python programmer this would look nicer
81+
app_dict = dict((k, v) for (k, v) in apps.iteritems() if ({ k.lower():v for k,v in v.items() }.get('installed', '0') == '1'))
7982

8083
return app_dict

0 commit comments

Comments
 (0)