Author: Armin Rigo <[email protected]>
Branch:
Changeset: r64856:9e9835f0f54b
Date: 2013-06-11 15:22 +0200
http://bitbucket.org/pypy/pypy/changeset/9e9835f0f54b/
Log: try to be on the safe side
diff --git a/pypy/module/sys/app.py b/pypy/module/sys/app.py
--- a/pypy/module/sys/app.py
+++ b/pypy/module/sys/app.py
@@ -29,14 +29,13 @@
try:
# first try to print the exception's class name
stderr = sys.stderr
- stderr.write(getattr(exctype, '__name__', exctype))
+ stderr.write(str(getattr(exctype, '__name__', exctype)))
# then attempt to get the str() of the exception
try:
s = str(value)
except:
s = '<failure of str() on the exception instance>'
- # then print it, and don't worry too much about the extra space
- # between the exception class and the ':'
+ # then print it
if s:
stderr.write(': %s\n' % (s,))
else:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit