community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1703022 - /comdev/projects.apache.org/scripts/import/parsecommittees.py
Date Mon, 14 Sep 2015 18:14:08 GMT
Author: sebb
Date: Mon Sep 14 18:14:07 2015
New Revision: 1703022

URL: http://svn.apache.org/r1703022
Log:
Rename overused variable name (data)

Modified:
    comdev/projects.apache.org/scripts/import/parsecommittees.py

Modified: comdev/projects.apache.org/scripts/import/parsecommittees.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/parsecommittees.py?rev=1703022&r1=1703021&r2=1703022&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/parsecommittees.py (original)
+++ comdev/projects.apache.org/scripts/import/parsecommittees.py Mon Sep 14 18:14:07 2015
@@ -138,13 +138,13 @@ for s in itemlist :
         print(err)
 
 with open("../../data/board/committee-info.txt", "rb") as f:
-    data = f.read().decode('utf-8')
+    cidata = f.read().decode('utf-8')
     f.close()
 
 # extract reporting cycles information
 cycles = { 'Incubator': 0 } # Incubator reports each month
 current = 1
-reports = data[data.index("January, April, July, October"):data.index('Next month')]
+reports = cidata[cidata.index("January, April, July, October"):cidata.index('Next month')]
 buf = io.StringIO(reports)
 newCycle = True
 for p in buf.readlines():
@@ -156,9 +156,9 @@ for p in buf.readlines():
             newCycle = True
             current += 1
 # extract committees composition
-data = data[data.index('Hint: '):]
-data = data[data.index('* '):]
-buf = io.StringIO(data)
+cidata = cidata[cidata.index('Hint: '):]
+cidata = cidata[cidata.index('* '):]
+buf = io.StringIO(cidata)
 curCommittee = ''
 committees = {}
 c = {}
@@ -196,7 +196,7 @@ committeesMap = {}
 addedCommittees = []
 c = {}
 
-for pmc in re.findall(r"\* .+?\s+\(est\. [0-9/]+[^\r\n]+", data):
+for pmc in re.findall(r"\* .+?\s+\(est\. [0-9/]+[^\r\n]+", cidata):
 
     #print(pmc)
     m = re.search(r"\* (.+?)\s+\(est. ([0-9]+)/([0-9]+)", pmc)



Mime
View raw message