summaryrefslogtreecommitdiff
path: root/ez_setup.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-08-10 13:18:06 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-08-10 13:18:06 -0400
commit38798cd5dcb8c5353d31ed0f882118067f09547f (patch)
tree61fcbe0ad4aa46f21a1476377674ddf451bc75f5 /ez_setup.py
parent8e7f9858be7f4869b4ff9d9b81fea2093086be3d (diff)
downloadpython-setuptools-git-38798cd5dcb8c5353d31ed0f882118067f09547f.tar.gz
Restore Python 2.4 compatibility in ez_setup
Diffstat (limited to 'ez_setup.py')
-rw-r--r--ez_setup.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ez_setup.py b/ez_setup.py
index a9c9cbf0..00cf47aa 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -36,6 +36,15 @@ def _python_cmd(*args):
args = (sys.executable,) + args
return subprocess.call(args) == 0
+def _check_call_py24(cmd, *args, **kwargs):
+ res = subprocess.call(cmd, *args, **kwargs)
+ class CalledProcessError(Exception):
+ pass
+ if not res == 0:
+ msg = "Command '%s' return non-zero exit status %d" % (cmd, res)
+ raise CalledProcessError(msg)
+vars(subprocess).setdefault('check_call', _check_call_py24)
+
def _install(tarball, install_args=()):
# extracting the tarball
tmpdir = tempfile.mkdtemp()