0
0
mirror of https://github.com/django/django.git synced 2024-11-30 07:06:18 +01:00

Fixed #8235: use subprocess instead of popen3 so that Python 2.6 is happy. Thanks, Karen Tracey.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8309 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2008-08-11 19:13:57 +00:00
parent 1613903906
commit efaa891b1f

View File

@ -106,7 +106,12 @@ class AdminScriptTestCase(unittest.TestCase):
# Move to the test directory and run
os.chdir(test_dir)
stdin, stdout, stderr = os.popen3(cmd)
try:
from subprocess import Popen, PIPE
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
stdin, stdout, stderr = (p.stdin, p.stdout, p.stderr)
except ImportError:
stdin, stdout, stderr = os.popen3(cmd)
out, err = stdout.read(), stderr.read()
# Restore the old environment