Author: Armin Rigo <[email protected]>
Branch:
Changeset: r66157:efbddbfc2569
Date: 2013-08-14 20:35 +0200
http://bitbucket.org/pypy/pypy/changeset/efbddbfc2569/
Log: Don't crash when we're completely confused and about to print a
"ooops something went wrong" kind of message, sys.stderr exists, but
is not pointing to a writable file. Just shrug and ignore this part
of the message rather than blow up.
diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -119,13 +119,12 @@
except:
try:
stderr = sys.stderr
- except AttributeError:
- pass # too bad
- else:
print >> stderr, 'Error calling sys.excepthook:'
originalexcepthook(*sys.exc_info())
print >> stderr
print >> stderr, 'Original exception was:'
+ except:
+ pass # too bad
# we only get here if sys.excepthook didn't do its job
originalexcepthook(etype, evalue, etraceback)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit