Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 7163:1be530a3180e
Fix util.popen2 for Python 2.3
1. trigger ImportError early, so fallbacks are activated
2. util.popen2 replaces previous usage of os.popen2, not popen2.popen2
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 19 Oct 2008 12:13:25 +0200 |
parents | 0c63b87d9bce |
children | cae820101762 |
line wrap: on
line diff
--- 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