incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r1185441 - /incubator/public/trunk/clutch.py
Date Tue, 18 Oct 2011 00:32:17 GMT
Author: crossley
Date: Tue Oct 18 00:32:17 2011
New Revision: 1185441

URL: http://svn.apache.org/viewvc?rev=1185441&view=rev
Log:
Use subprocess.Popen rather than subprocess.getoutput

Modified:
    incubator/public/trunk/clutch.py

Modified: incubator/public/trunk/clutch.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch.py?rev=1185441&r1=1185440&r2=1185441&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Tue Oct 18 00:32:17 2011
@@ -618,14 +618,11 @@ for k in sorted(projectNames, key=str.lo
       projects[k]['entryDate'] = entryDate
 
   # Gather recent updates to their status page.
-  # FIXME: Perhaps this operation could be improved. Use "subprocess" module.
-  # On this older Mac still python-2.3.5, so no. See notes at top.
+  inputFile = "site-author/projects/%s.xml" % projects[k]['statusFileName']
   if optionVerbose:
-    print("DEBUG: Parsing svn log for site-author/projects/%s.xml ..." % \
-        projects[k]['statusFileName'])
-  command = "svn log --xml site-author/projects/%s.xml" % \
-      projects[k]['statusFileName']
-  dom = xml.dom.minidom.parseString(subprocess.getoutput(command))
+    print("DEBUG: Parsing svn log for %s ..." % inputFile)
+  outputString = subprocess.Popen(['svn', 'log', '--xml', inputFile], stdout=subprocess.PIPE).communicate()[0]
+  dom = xml.dom.minidom.parseString(outputString)
   rowCounter = 0
   count1 = 0
   count2 = 0



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


Mime
View raw message