Commits

Anonymous committed 9145ea8

Fix python_cmd return value

  • Participants
  • Parent commits 2b92bbe
  • Branches 0.6-maintenance

Comments (0)

Files changed (1)

File distribute_setup.py

 """
 
 
-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):
 
         # installing
         log.warn('Installing Distribute')
-        assert python_cmd('setup.py install')
+        assert python_cmd('setup.py', 'install')
     finally:
         os.chdir(old_wd)