Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored
7  tests/regressiontests/admin_scripts/tests.py
@@ -106,7 +106,12 @@ def run_test(self, script, args, settings_file=None, apps=None):
106 106
 
107 107
         # Move to the test directory and run
108 108
         os.chdir(test_dir)
109  
-        stdin, stdout, stderr = os.popen3(cmd)
  109
+        try:
  110
+            from subprocess import Popen, PIPE
  111
+            p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
  112
+            stdin, stdout, stderr = (p.stdin, p.stdout, p.stderr)
  113
+        except ImportError:
  114
+            stdin, stdout, stderr = os.popen3(cmd)
110 115
         out, err = stdout.read(), stderr.read()
111 116
 
112 117
         # Restore the old environment

0 notes on commit efaa891

Please sign in to comment.
Something went wrong with that request. Please try again.