[pypy-svn] pypy default: Fixed stdout/stderr mixup.

tav commits-noreply at bitbucket.org
Wed Mar 2 10:04:06 CET 2011


Author: tav <tav at espians.com>
Branch: 
Changeset: r42378:5c272f61d591
Date: 2011-03-02 09:03 +0000
http://bitbucket.org/pypy/pypy/changeset/5c272f61d591/

Log:	Fixed stdout/stderr mixup.

diff --git a/pypy/translator/platform/maemo.py b/pypy/translator/platform/maemo.py
--- a/pypy/translator/platform/maemo.py
+++ b/pypy/translator/platform/maemo.py
@@ -61,7 +61,7 @@
         log.execute('/scratchbox/login ' + cc + ' ' + ' '.join(args))
         args = [cc] + args
         returncode, stdout, stderr = _run_subprocess('/scratchbox/login', args)
-        self._handle_error(returncode, stderr, stdout, outname)
+        self._handle_error(returncode, stdout, stderr, outname)
     
     def execute(self, executable, args=[], env=None):
         if isinstance(args, str):

diff --git a/pypy/translator/platform/windows.py b/pypy/translator/platform/windows.py
--- a/pypy/translator/platform/windows.py
+++ b/pypy/translator/platform/windows.py
@@ -193,7 +193,7 @@
 
         return exe_name
 
-    def _handle_error(self, returncode, stderr, stdout, outname):
+    def _handle_error(self, returncode, stdout, stderr, outname):
         if returncode != 0:
             # Microsoft compilers write compilation errors to stdout
             stderr = stdout + stderr
@@ -361,7 +361,7 @@
     def library_dirs_for_libffi(self):
         return []
 
-    def _handle_error(self, returncode, stderr, stdout, outname):
+    def _handle_error(self, returncode, stdout, stderr, outname):
         # Mingw tools write compilation errors to stdout
         super(MingwPlatform, self)._handle_error(
-            returncode, stderr + stdout, '', outname)
+            returncode, '', stderr + stdout, outname)

diff --git a/pypy/translator/platform/__init__.py b/pypy/translator/platform/__init__.py
--- a/pypy/translator/platform/__init__.py
+++ b/pypy/translator/platform/__init__.py
@@ -117,9 +117,9 @@
         args = cclist[1:] + args
         returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ,
                                                      cwd)
-        self._handle_error(returncode, stderr, stdout, outname)
+        self._handle_error(returncode, stdout, stderr, outname)
 
-    def _handle_error(self, returncode, stderr, stdout, outname):
+    def _handle_error(self, returncode, stdout, stderr, outname):
         if returncode != 0:
             errorfile = outname.new(ext='errors')
             errorfile.write(stderr, 'wb')


More information about the Pypy-commit mailing list