community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1872531 - /comdev/reporter.apache.org/trunk/scripts/committee_info.py
Date Thu, 09 Jan 2020 07:54:38 GMT
Author: humbedooh
Date: Thu Jan  9 07:54:37 2020
New Revision: 1872531

URL: http://svn.apache.org/viewvc?rev=1872531&view=rev
Log:
move data fetch into functions so it doesn't go stale

Modified:
    comdev/reporter.apache.org/trunk/scripts/committee_info.py

Modified: comdev/reporter.apache.org/trunk/scripts/committee_info.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/committee_info.py?rev=1872531&r1=1872530&r2=1872531&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/committee_info.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/committee_info.py Thu Jan  9 07:54:37 2020
@@ -32,14 +32,13 @@ def loadJson(url):
         resp.close()
     return j
 
-cidata = loadJson(URL) # The data read from the file
-
 def PMCmails():
 
     """
         Returns output of the form:
         ['ace',...'whimsical',...]
     """
+    cidata = loadJson(URL)
     committees = cidata['committees']
     mails=[]
     for ctte in committees:
@@ -62,6 +61,7 @@ def PMCnames():
         Only includes actual PMC names
         Returns 'webservices' rather than 'ws'
     """
+    cidata = loadJson(URL)
     committees = cidata['committees']
 
     namejson={}
@@ -100,6 +100,7 @@ def PMCsummary():
         Only includes actual PMCs
         Returns 'webservices' rather than 'ws'
     """
+    cidata = loadJson(URL)
     committees = cidata['committees']
 
     namejson={}
@@ -125,7 +126,7 @@ def PMCsummary():
 
 def pmcdates():
     dates = {}
-    
+    cidata = loadJson(URL)
     cttes = cidata['committees']
     for ent in cttes:
         ctte = cttes[ent]
@@ -156,7 +157,7 @@ def pmcdates():
     return dates
 
 def cycles():
-
+    cidata = loadJson(URL)
     committees = cidata['committees']
 
     report_cycles={}
@@ -175,6 +176,7 @@ def cycles():
 def getPMCs(uid, incubator=False):
     """Returns the array of PMC committees to which the uid belongs. Excludes incubator by
default"""
     pmcs = []
+    cidata = loadJson(URL)
     cttes = cidata['committees']
     for ent in cttes:
         ctte = cttes[ent]



Mime
View raw message