Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r63354:c194bbd3ad95
Date: 2013-04-14 16:14 -0700
http://bitbucket.org/pypy/pypy/changeset/c194bbd3ad95/

Log:    ensure the exception is normalized before printing it

diff --git a/pypy/module/cpyext/pyerrors.py b/pypy/module/cpyext/pyerrors.py
--- a/pypy/module/cpyext/pyerrors.py
+++ b/pypy/module/cpyext/pyerrors.py
@@ -262,9 +262,9 @@
     type, value and traceback of the printed exception, respectively."""
     if not PyErr_Occurred(space):
         PyErr_BadInternalCall(space)
-    state = space.fromcache(State)
-    operror = state.clear_exception()
 
+    operror = space.fromcache(State).clear_exception()
+    operror.normalize_exception(space)
     w_type = operror.w_type
     w_value = operror.get_w_value(space)
     w_tb = space.wrap(operror.get_traceback())
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to