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

Unified Diff: sitescripts/stats/bin/logprocessor.py

Issue 29589691: Issue 5757 - Update buildtools dependency, (re)move legacy extensions (Closed)
Patch Set: Created Oct. 26, 2017, 10:50 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
Index: sitescripts/stats/bin/logprocessor.py
diff --git a/sitescripts/stats/bin/logprocessor.py b/sitescripts/stats/bin/logprocessor.py
index 987a984067b5e3d6279c9f952d23380cc8447b0f..1c1aedf6c02c0d69a22604ca4540973d3779107d 100644
--- a/sitescripts/stats/bin/logprocessor.py
+++ b/sitescripts/stats/bin/logprocessor.py
@@ -38,7 +38,20 @@ import sitescripts.stats.common as common
from sitescripts.utils import get_config, setupStderr
log_regexp = None
-gecko_apps = None
+KNOWN_APPS = {
tlucas 2017/11/02 10:03:29 I am not sure whether we (still) need all of these
Vasily Kuznetsov 2017/11/30 17:34:00 I suppose they might be needed because of users wi
tlucas 2017/11/30 18:15:26 By removing the code, you also mean "in a separate
Vasily Kuznetsov 2017/11/30 19:10:08 Yes.
+ '{55aba3ac-94d3-41a8-9e25-5c21fe874539}': 'adblockbrowser',
+ '{a79fe89b-6662-4ff4-8e88-09950ad4dfde}': 'conkeror',
+ 'dlm@emusic.com': 'emusic',
+ '{a23983c0-fd0e-11dc-95ff-0800200c9a66}': 'fennec',
+ '{aa3c5121-dab2-40e2-81ca-7ea25febc110}': 'fennec2',
+ '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'firefox',
+ '{aa5ca914-c309-495d-91cf-3141bbb04115}': 'midbrowser',
+ 'prism@developer.mozilla.org': 'prism',
+ '{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}': 'seamonkey',
+ 'songbird@songbirdnest.com': 'songbird',
+ '{3550f703-e582-4d05-9a08-453d09bdfdc6}': 'thunderbird',
+ 'toolkit@mozilla.org': 'toolkit',
+}
class StatsFile:
@@ -372,13 +385,9 @@ def parse_gecko_query(query):
version = params.get('version', ['unknown'])[0]
- global gecko_apps
- if gecko_apps == None:
- from buildtools.packagerGecko import KNOWN_APPS
- gecko_apps = {v: k for k, v in KNOWN_APPS.iteritems()}
appID = params.get('appID', ['unknown'])[0]
- application = gecko_apps.get(appID, 'unknown')
+ application = KNOWN_APPS.get(appID, 'unknown')
applicationVersion = params.get('appVersion', ['unknown'])[0]
# Only leave the major and minor release number for application

Powered by Google App Engine
This is Rietveld