[pypy-svn] r59254 - pypy/branch/cbuild-refactor/pypy/translator/platform

fijal at codespeak.net fijal at codespeak.net
Mon Oct 20 10:57:50 CEST 2008


Author: fijal
Date: Mon Oct 20 10:57:48 2008
New Revision: 59254

Modified:
   pypy/branch/cbuild-refactor/pypy/translator/platform/maemo.py
Log:
make maemo more robust against different kind of arguments


Modified: pypy/branch/cbuild-refactor/pypy/translator/platform/maemo.py
==============================================================================
--- pypy/branch/cbuild-refactor/pypy/translator/platform/maemo.py	(original)
+++ pypy/branch/cbuild-refactor/pypy/translator/platform/maemo.py	Mon Oct 20 10:57:48 2008
@@ -62,8 +62,12 @@
         self._handle_error(returncode, stderr, stdout, outname)
     
     def execute(self, executable, args=[], env=None):
-        args = [str(executable)] + args
-        log.message('executing /scratchbox/login ' + ' '.join(args))
+        if isinstance(args, str):
+            args = str(executable) + ' ' + args
+            log.message('executing /scratchbox/login ' + args)
+        else:
+            args = [str(executable)] + args
+            log.message('executing /scratchbox/login ' + ' '.join(args))
         returncode, stdout, stderr = _run_subprocess('/scratchbox/login', args,
                                                      env)
         return ExecutionResult(returncode, stdout, stderr)



More information about the Pypy-commit mailing list