[pypy-commit] pypy default: From this last-level helper, don't propagate further OSErrors

arigo noreply at buildbot.pypy.org
Sun Jun 7 22:29:26 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r77945:76611312113e
Date: 2015-06-07 22:29 +0200
http://bitbucket.org/pypy/pypy/changeset/76611312113e/

Log:	From this last-level helper, don't propagate further OSErrors

diff --git a/pypy/goal/targetpypystandalone.py b/pypy/goal/targetpypystandalone.py
--- a/pypy/goal/targetpypystandalone.py
+++ b/pypy/goal/targetpypystandalone.py
@@ -21,7 +21,10 @@
     this_dir = os.path.dirname(sys.argv[0])
 
 def debug(msg):
-    os.write(2, "debug: " + msg + '\n')
+    try:
+        os.write(2, "debug: " + msg + '\n')
+    except OSError:
+        pass     # bah, no working stderr :-(
 
 # __________  Entry point  __________
 


More information about the pypy-commit mailing list