community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1729113 - /comdev/reporter.apache.org/trunk/site/getjson.py
Date Mon, 08 Feb 2016 09:41:32 GMT
Author: sebb
Date: Mon Feb  8 09:41:31 2016
New Revision: 1729113

URL: http://svn.apache.org/viewvc?rev=1729113&view=rev
Log:
Oops - remove debug
Check membership once

Modified:
    comdev/reporter.apache.org/trunk/site/getjson.py

Modified: comdev/reporter.apache.org/trunk/site/getjson.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/getjson.py?rev=1729113&r1=1729112&r2=1729113&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/getjson.py (original)
+++ comdev/reporter.apache.org/trunk/site/getjson.py Mon Feb  8 09:41:31 2016
@@ -36,7 +36,7 @@ import committee_info
 from urlutils import UrlCache
 
 # This script may be called frequently, so don't just rely on IfNewer checks
-uc = UrlCache(interval=60, silent=False)
+uc = UrlCache(interval=60, silent=True)
 
 # Relative path to home directory from here (site)
 RAOHOME = '../'
@@ -90,7 +90,6 @@ def readJson(filename, *default):
     return data
 
 def loadJson(url):
-    print("Reading " + url)
     resp = uc.get(url, name=None, encoding='utf-8', errors=None)
     j = json.load(resp)
     resp.close()
@@ -232,11 +231,12 @@ if re.match(r"^[-a-zA-Z0-9_.]+$", user):
     pchanges = readJson(RAOHOME+"data/pmcs.json")
     cchanges = readJson(RAOHOME+"data/projects.json")
     bugzillastats = readJson(RAOHOME+"data/bugzillastats.json", {})
+    isMember = isMember(user)
 
     groups = getPMCs(user)
-    if include and isMember(user) and not include in groups and len(include) > 1:
+    if include and isMember and not include in groups and len(include) > 1:
         groups.append(include)
-    if oproject and len(oproject) > 0 and isMember(user):
+    if oproject and len(oproject) > 0 and isMember:
         groups = [oproject]
     mlstats = {}
     ml = readJson(RAOHOME+"data/mailinglists.json")
@@ -323,7 +323,7 @@ if re.match(r"^[-a-zA-Z0-9_.]+$", user):
                         cdata[group]['committer'][member] = cchanges[pmc][member]
         if group in pmcdates: # Make sure we have this PMC in the JSON, so as to not bork
             dates[group] = pmcdates[group] # only send the groups we want
-    if not isMember(user):
+    if not isMember:
         allpmcs = []
     output = {
         'count': count,



Mime
View raw message