Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #8235: use subprocess instead of popen3 so that Python 2.6 is h…

…appy. Thanks, Karen Tracey.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8309 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit efaa891b1f17a3224bb910047c0da4e0e2a1b255 1 parent 1613903
Jacob Kaplan-Moss jacobian authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 tests/regressiontests/admin_scripts/tests.py
7 tests/regressiontests/admin_scripts/tests.py
View
@@ -106,7 +106,12 @@ def run_test(self, script, args, settings_file=None, apps=None):
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.