incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1348887 - /incubator/public/trunk/clutch.py
Date Mon, 11 Jun 2012 15:03:20 GMT
Author: sebb
Date: Mon Jun 11 15:03:20 2012
New Revision: 1348887

URL: http://svn.apache.org/viewvc?rev=1348887&view=rev
Log:
Minor reformat to standardise spacing around operators

Modified:
    incubator/public/trunk/clutch.py

Modified: incubator/public/trunk/clutch.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch.py?rev=1348887&r1=1348886&r2=1348887&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Mon Jun 11 15:03:20 2012
@@ -120,9 +120,9 @@ INCUBATOR_RELEASES_BAD_NAME = 'http://pe
 SITE_CONTENT_DIR = 'content/'
 
 parser = argparse.ArgumentParser(description='Gather details about projects currently in
incubation.')
-parser.add_argument('--ignoreState',   action='store_true', default='False', help='Ignore
state (default false)')
-parser.add_argument('-v', '--verbose', action='store_true', default='False', help='verbose
mode (default false)')
-parser.add_argument('-q', '--quiet',   action='store_true', default='False', help='quiet
mode (default false)')
+parser.add_argument('--ignoreState',    action='store_true', default='False', help='Ignore
state (default false)')
+parser.add_argument('-v', '--verbose',  action='store_true', default='False', help='verbose
mode (default false)')
+parser.add_argument('-q', '--quiet',    action='store_true', default='False', help='quiet
mode (default false)')
 parser.add_argument('-x', '--external', action='store_true', default='False', help='log external
requests (e.g. svn, http) (default false)')
 args = parser.parse_args()
 
@@ -165,7 +165,7 @@ def getText(nodelist):
   return rc
 
 def normaliseSVNurl(url):
-    rc = url.replace('https://','http://')
+    rc = url.replace('https://', 'http://')
     if not rc[-1] == '/':
       rc = rc + '/'
     return rc
@@ -304,7 +304,7 @@ for k in sorted(projectNames, key=str.lo
 projectsTable = {} # internal data from podlings.xml
 
 # Parse the podlings data file ---
-dom = xml.dom.minidom.parse(SITE_CONTENT_DIR+"podlings.xml")
+dom = xml.dom.minidom.parse(SITE_CONTENT_DIR + "podlings.xml")
 
 graduatedProjects = {}
 history = {}
@@ -396,7 +396,7 @@ for k in sorted(projectNames, key=str.lo
     print("DEBUG: Will try alternate names: {0}".format(projects[k]['resourceNames']))
 
   # parse their project status file to extract specific information
-  statusFile = SITE_CONTENT_DIR+"projects/{0}.xml".format(projectsTable[k]['statusFileName'])
+  statusFile = SITE_CONTENT_DIR + "projects/{0}.xml".format(projectsTable[k]['statusFileName'])
   if os.path.exists(statusFile):
     dom = xml.dom.minidom.parse(statusFile)
     # get the project info hints
@@ -548,7 +548,7 @@ projectMailLists = {}
 mailListNamesRE = re.compile("(.*)-([^-]+)/")
 mailListNamesUsualRE = re.compile("commits|cvs|dev|issues|user|spec")
 for listName in mailLists.names:
-  if listName in ["announce/","cvs/","general/","projects/"]:
+  if listName in ["announce/", "cvs/", "general/", "projects/"]:
     continue
   if optionVerbose:
     print("DEBUG: listName=" + listName)
@@ -654,7 +654,7 @@ for k in sorted(projectNames, key=str.lo
   projects[k]['mentors'] = projectsTable[k]['mentors']
   projects[k]['startDate'] = projectsTable[k]['startDate']
 
-  statusFile = SITE_CONTENT_DIR+"projects/{0}.xml".format(projectsTable[k]['statusFileName'])
+  statusFile = SITE_CONTENT_DIR + "projects/{0}.xml".format(projectsTable[k]['statusFileName'])
   if not os.path.exists(statusFile):
     errorMsg = "{0}: Missing status file".format(k)
     print('ERROR:', errorMsg)
@@ -681,7 +681,7 @@ for k in sorted(projectNames, key=str.lo
       projects[k]['entryDate'] = entryDate
 
   # Gather recent updates to their status page.
-  inputFile = SITE_CONTENT_DIR+"projects/{0}.xml".format(projects[k]['statusFileName'])
+  inputFile = SITE_CONTENT_DIR + "projects/{0}.xml".format(projects[k]['statusFileName'])
   if optionVerbose:
     print("DEBUG: Parsing svn log for {0} ...".format(inputFile))
   outputString = osExec(['svn', 'log', '--xml', inputFile])
@@ -973,12 +973,12 @@ reportingGroups = {'month': 'Monthly',
     'group-2': 'February,May,August,November',
     'group-3': 'March,June,September,December'}
 monthsLong = 'January February March April May June July August September October November
December'.split()
-nameCurrentReport = "{0}{1}".format(monthsLong[gatherDate.month-1], gatherDate.year)
+nameCurrentReport = "{0}{1}".format(monthsLong[gatherDate.month - 1], gatherDate.year)
 urlCurrentReport = "".join(["http://wiki.apache.org/incubator/", nameCurrentReport])
 
-fileList = open(SITE_CONTENT_DIR+'clutch.txt', 'w')
+fileList = open(SITE_CONTENT_DIR + 'clutch.txt', 'w')
 
-fileXmlo1 = open(SITE_CONTENT_DIR+'clutcho1.ent', encoding='utf-8', mode='w')
+fileXmlo1 = open(SITE_CONTENT_DIR + 'clutcho1.ent', encoding='utf-8', mode='w')
 fileXmlo1.write("<!-- generated by clutch; do not edit -->\n")
 if len(otherIssues):
   otherXml = """<li>other issues <a href="#other">listed</a> below for:
"""
@@ -991,7 +991,7 @@ if len(otherIssues):
   fileXmlo1.write(otherXml)
 fileXmlo1.close()
 
-fileXmlt = open(SITE_CONTENT_DIR+'clutcht.ent', encoding='utf-8', mode='w')
+fileXmlt = open(SITE_CONTENT_DIR + 'clutcht.ent', encoding='utf-8', mode='w')
 fileXmlt.write("<!-- generated by clutch; do not edit -->\n")
 tableTopXml = """
         Clutch last gathered: {0} UTC.<br />
@@ -1006,13 +1006,13 @@ reportList2 = ""
 reportList3 = ""
 tableRowCount = 0
 tableRowCountMid = int(len(projects) / 2)
-fileXml = open(SITE_CONTENT_DIR+'clutchr1.ent', encoding='utf-8', mode='w')
+fileXml = open(SITE_CONTENT_DIR + 'clutchr1.ent', encoding='utf-8', mode='w')
 fileXml.write("<!-- generated by clutch; do not edit -->\n")
 for k in sorted(projectNames, key=str.lower):
   tableRowCount += 1
   if tableRowCount == tableRowCountMid:
     fileXml.close()
-    fileXml = open(SITE_CONTENT_DIR+'clutchr2.ent', encoding='utf-8', mode='w')
+    fileXml = open(SITE_CONTENT_DIR + 'clutchr2.ent', encoding='utf-8', mode='w')
     fileXml.write("<!-- generated by clutch; do not edit -->\n")
   fileXml.write('        <tr id="{0}">\n'.format(k))
   fileXml.write('          <td')
@@ -1163,7 +1163,7 @@ fileXml.close()
 # End of rows
 
 # Other issues
-fileXmlo2 = open(SITE_CONTENT_DIR+'clutcho2.ent', encoding='utf-8', mode='w')
+fileXmlo2 = open(SITE_CONTENT_DIR + 'clutcho2.ent', encoding='utf-8', mode='w')
 fileXmlo2.write("<!-- generated by clutch; do not edit -->\n")
 if len(otherIssues):
   otherIssues.sort()
@@ -1176,7 +1176,7 @@ fileXmlo2.close()
 
 mentors = list(mentorsProjects.keys())
 mentors.sort()
-fileXmlm = open(SITE_CONTENT_DIR+'clutchm.ent', encoding='utf-8', mode='w')
+fileXmlm = open(SITE_CONTENT_DIR + 'clutchm.ent', encoding='utf-8', mode='w')
 fileXmlm.write("<!-- generated by clutch; do not edit -->\n")
 for mentor in mentors:
   fileXmlm.write("        <li><strong>{0}</strong>: {1}</li>\n".format(mentor,
', '.join(mentorsProjects[mentor])))
@@ -1184,17 +1184,17 @@ fileXmlm.close()
 
 fileList.close()
 
-fileReport1 = open(SITE_CONTENT_DIR+'report_due_1.txt', 'w')
+fileReport1 = open(SITE_CONTENT_DIR + 'report_due_1.txt', 'w')
 fileReport1.write(reportList1)
 fileReport1.close()
-fileReport2 = open(SITE_CONTENT_DIR+'report_due_2.txt', 'w')
+fileReport2 = open(SITE_CONTENT_DIR + 'report_due_2.txt', 'w')
 fileReport2.write(reportList2)
 fileReport2.close()
-fileReport3 = open(SITE_CONTENT_DIR+'report_due_3.txt', 'w')
+fileReport3 = open(SITE_CONTENT_DIR + 'report_due_3.txt', 'w')
 fileReport3.write(reportList3)
 fileReport3.close()
 
-fileHistory = open(SITE_CONTENT_DIR+'history/entry.txt', 'w')
+fileHistory = open(SITE_CONTENT_DIR + 'history/entry.txt', 'w')
 fileHistory.write('# podlings entered incubation\n')
 sequence = len(history) + 1
 # sorted by date



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message