[Erp5-report] r29609 - /erp5/trunk/products/ERP5/Tool/TemplateTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Oct 13 18:08:52 CEST 2009


Author: nicolas.dumazet
Date: Tue Oct 13 18:08:51 2009
New Revision: 29609

URL: http://svn.erp5.org?rev=29609&view=rev
Log:
Write directly test output to avoid waiting for test completion

Modified:
    erp5/trunk/products/ERP5/Tool/TemplateTool.py

Modified: erp5/trunk/products/ERP5/Tool/TemplateTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/TemplateTool.py?rev=29609&r1=29608&r2=29609&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/TemplateTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/TemplateTool.py [utf8] Tue Oct 13 18:08:51 2009
@@ -459,10 +459,12 @@
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.STDOUT)
 
-      output = process.communicate()[0]
-
-      outfile.write(output)
-      outfile.flush()
+      while True:
+        line = process.stdout.readline()
+        if not line:
+          break
+        outfile.write(line)
+        outfile.flush()
 
       if hasattr(outfile, 'getvalue'):
         return outfile.getvalue()




More information about the Erp5-report mailing list