tests/run-tests.py
changeset 8280 0b02d98d44d0
parent 8258 2263c49af028
child 8397 613ac2856535
--- a/tests/run-tests.py	Sat May 02 21:29:00 2009 +0200
+++ b/tests/run-tests.py	Sat May 02 23:05:35 2009 +0200
@@ -11,28 +11,24 @@
 import errno
 import optparse
 import os
-try:
-    import subprocess
-    subprocess.Popen  # trigger ImportError early
-    closefds = os.name == 'posix'
-    def Popen4(cmd, bufsize=-1):
-        p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
-                             close_fds=closefds,
-                             stdin=subprocess.PIPE, stdout=subprocess.PIPE,
-                             stderr=subprocess.STDOUT)
-        p.fromchild = p.stdout
-        p.tochild = p.stdin
-        p.childerr = p.stderr
-        return p
-except ImportError:
-    subprocess = None
-    from popen2 import Popen4
+import subprocess
 import shutil
 import signal
 import sys
 import tempfile
 import time
 
+closefds = os.name == 'posix'
+def Popen4(cmd, bufsize=-1):
+    p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
+                         close_fds=closefds,
+                         stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+                         stderr=subprocess.STDOUT)
+    p.fromchild = p.stdout
+    p.tochild = p.stdin
+    p.childerr = p.stderr
+    return p
+
 # reserved exit code to skip test (used by hghave)
 SKIPPED_STATUS = 80
 SKIPPED_PREFIX = 'skipped: '