Created
June 14, 2016 18:25
-
-
Save brad-anton/a8a94a8e8bf5f69a3502f8433a182568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __check_preferences_json(self, preferences): | |
"""Pulls Extension information out of the preferences file | |
""" | |
extensions = [] | |
with open(preferences, 'rb') as f: | |
prefs_json = json.load(f) | |
extensions_json = prefs_json['extensions']['settings'] | |
for extension in extensions_json.iterkeys(): | |
name = None | |
version = None | |
if 'manifest' in extensions_json[extension]: | |
name = extensions_json[extension]['manifest']['name'] | |
version = extensions_json[extension]['manifest']['version'] | |
#e = Extension(self.os.CHROME_NAME, name, version, None, extension) | |
e = Extension(name, version, None, extension) | |
extensions.append(e.todict()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment