[Erp5-report] r33195 luke - /erp5/trunk/buildout/tests/assertSoftware.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 1 17:26:04 CET 2010


Author: luke
Date: Mon Mar  1 17:26:03 2010
New Revision: 33195

URL: http://svn.erp5.org?rev=33195&view=rev
Log:
 - simplify subprocess communication and avoid leaving zombies (thanks to jm)

Modified:
    erp5/trunk/buildout/tests/assertSoftware.py

Modified: erp5/trunk/buildout/tests/assertSoftware.py
URL: http://svn.erp5.org/erp5/trunk/buildout/tests/assertSoftware.py?rev=33195&r1=33194&r2=33195&view=diff
==============================================================================
--- erp5/trunk/buildout/tests/assertSoftware.py [utf8] (original)
+++ erp5/trunk/buildout/tests/assertSoftware.py [utf8] Mon Mar  1 17:26:03 2010
@@ -20,8 +20,8 @@
       f.close()
       f_stat = os.stat(name)
       os.chmod(name, f_stat.st_mode | stat.S_IXUSR)
-      result = ''.join(subprocess.Popen([name], stdout=subprocess.PIPE)\
-          .stdout.readlines()).strip()
+      result = subprocess.Popen([name], stdout=subprocess.PIPE)\
+          .communicate()[0].strip()
       self.assertEqual('(2, 4)', result)
     finally:
       os.unlink(name)




More information about the Erp5-report mailing list