Index: sitescripts/stats/bin/logprocessor.py |
=================================================================== |
--- a/sitescripts/stats/bin/logprocessor.py |
+++ b/sitescripts/stats/bin/logprocessor.py |
@@ -299,15 +299,18 @@ |
else: |
info["downloadInterval"] = "%i hour(s)" % (diff.seconds / 3600) |
- diffdays = (info["time"].date() - last_update.date()).days |
- if diffdays == 0: |
- info["previousDownload"] = "same day" |
- elif diffdays < 30: |
- info["previousDownload"] = "%i day(s)" % diffdays |
- elif diffdays < 365: |
- info["previousDownload"] = "%i month(s)" % (diffdays / 30) |
+ if info["addonName"].startswith("adblockplus"): |
+ diffdays = (info["time"].date() - last_update.date()).days |
+ if diffdays == 0: |
+ info["previousDownload"] = "same day" |
+ elif diffdays < 30: |
+ info["previousDownload"] = "%i day(s)" % diffdays |
+ elif diffdays < 365: |
+ info["previousDownload"] = "%i month(s)" % (diffdays / 30) |
+ else: |
+ info["previousDownload"] = "%i year(s)" % (diffdays / 365) |
else: |
- info["previousDownload"] = "%i year(s)" % (diffdays / 365) |
+ info["previousDownload"] = "unknown" |
if last_update.year != info["time"].year or last_update.month != info["time"].month: |
info["firstInMonth"] = info["firstInDay"] = True |
@@ -425,6 +428,7 @@ |
info["fullApplication"] = "%s %s" % (info["application"], info["applicationVersion"]) |
if "platform" in info: |
info["fullPlatform"] = "%s %s" % (info["platform"], info["platformVersion"]) |
+ |
Felix Dahlke
2014/05/22 08:30:38
Unrelated whitespace change?
Sebastian Noack
2014/05/22 08:40:39
Done.
|
return info |
def add_record(info, section, ignore_fields=()): |