Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r46404:16c23a92f5e0
Date: 2011-08-10 10:20 +0200
http://bitbucket.org/pypy/pypy/changeset/16c23a92f5e0/

Log:    Use "print >> sys.stderr" instead of sys.write(), as a better way to
        print random objects and to add a newline after the message.

diff --git a/pypy/translator/goal/app_main.py b/pypy/translator/goal/app_main.py
--- a/pypy/translator/goal/app_main.py
+++ b/pypy/translator/goal/app_main.py
@@ -33,11 +33,9 @@
         except:
             # not an integer: print it to stderr
             try:
-                stderr = sys.stderr
-            except AttributeError:
+                print >> sys.stderr, exitcode
+            except:
                 pass   # too bad
-            else:
-                stderr.write(exitcode)
             exitcode = 1
     raise SystemExit(exitcode)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to