[Zope-Checkins] SVN: zdaemon/branches/matt-python-versions/src/zdaemon/tests/tests.py Changed os.popen4 to the 'subprocess' module to make Python 2.6 happy.
matt@zope.com
cvs-admin at zope.org
Tue Nov 25 17:24:15 EST 2008
Log message for revision 93354:
Changed os.popen4 to the 'subprocess' module to make Python 2.6 happy.
Changed:
U zdaemon/branches/matt-python-versions/src/zdaemon/tests/tests.py
-=-
Modified: zdaemon/branches/matt-python-versions/src/zdaemon/tests/tests.py
===================================================================
--- zdaemon/branches/matt-python-versions/src/zdaemon/tests/tests.py 2008-11-25 22:18:20 UTC (rev 93353)
+++ zdaemon/branches/matt-python-versions/src/zdaemon/tests/tests.py 2008-11-25 22:24:15 UTC (rev 93354)
@@ -12,7 +12,7 @@
#
##############################################################################
-import os, re, shutil, sys, tempfile, unittest
+import os, re, shutil, sys, tempfile, unittest, subprocess
import ZConfig, zdaemon
from zope.testing import doctest, renormalizing
@@ -112,7 +112,10 @@
f()
def system(command, input=''):
- i, o = os.popen4(command)
+ PIPE = subprocess.PIPE
+ p = subprocess.Popen(command, shell=True, bufsize=0,
+ stdin=PIPE, stdout=PIPE, close_fds=True)
+ (i, o) = (p.stdin, p.stdout)
if input:
i.write(input)
i.close()
More information about the Zope-Checkins
mailing list