Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: packagerGecko.py

Issue 4777306409140224: Issue 2607 - Clear currentVersion on uninstallation (Closed)
Patch Set: Use json.loads rather than re.search Created May 29, 2015, 8:02 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packagerGecko.py
===================================================================
--- a/packagerGecko.py
+++ b/packagerGecko.py
@@ -231,9 +231,6 @@
templateData['hasChromeRequires'] = True
if name.startswith('lib/') and re.search(r'\bXMLHttpRequest\b', content):
templateData['hasXMLHttpRequest'] = True
- if name == 'defaults/prefs.js':
- if re.search(r'\.currentVersion"', content):
- templateData['hasVersionPref'] = True
if not '/' in name or name.startswith('lib/'):
if re.search(r'(?:^|\s)onShutdown\.', content):
templateData['hasShutdownHandlers'] = True
@@ -241,6 +238,8 @@
for name, content in files.iteritems():
if name == 'chrome.manifest':
templateData['hasChrome'] = True
+ elif name == 'defaults/prefs.json':
+ templateData['hasVersionPref'] = 'currentVersion' in json.loads(content).get('defaults', {})
elif name.endswith('.js'):
checkScript(name)
elif name.endswith('.xul'):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld