mercurial/util.py
changeset 7163 1be530a3180e
parent 7137 0c63b87d9bce
child 7164 cae820101762
--- a/mercurial/util.py	Sat Oct 18 21:52:22 2008 -0700
+++ b/mercurial/util.py	Sun Oct 19 12:13:25 2008 +0200
@@ -51,6 +51,7 @@
 
 try:
     import subprocess
+    subprocess.Popen  # trigger ImportError early
     closefds = os.name == 'posix'
     def popen2(cmd, mode='t', bufsize=-1):
         p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
@@ -76,7 +77,7 @@
 except ImportError:
     subprocess = None
     import popen2 as _popen2
-    popen2 = _popen2.popen2
+    popen2 = os.popen2
     Popen3 = _popen2.Popen3