From 269f12efa9ac5640bb9ad4a79c26e77c66f1a950 Mon Sep 17 00:00:00 2001 From: agronholm Date: Wed, 23 Sep 2009 03:10:40 +0300 Subject: Fix python_cmd return value --HG-- branch : distribute extra : rebase_source : 09f20b70ead91373507168c66a1f709a4eaba4f5 --- distribute_setup.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 83686932..e099b37b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -43,17 +43,9 @@ Description: xxx """ -def quote(c): - if sys.platform == 'win32': - if ' ' in c: - return '"%s"' % c - return c - - -def python_cmd(cmd): - python = quote(sys.executable) - cmd = quote(cmd) - return subprocess.call([python, cmd]) +def python_cmd(*args): + args = (sys.executable,) + args + return subprocess.call(args) == 0 def _install(tarball): @@ -74,7 +66,7 @@ def _install(tarball): # installing log.warn('Installing Distribute') - assert python_cmd('setup.py install') + assert python_cmd('setup.py', 'install') finally: os.chdir(old_wd) -- cgit v1.2.3