Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5-corowrapper
Changeset: r87212:b15c04d5555f
Date: 2016-09-18 23:09 +0200
http://bitbucket.org/pypy/pypy/changeset/b15c04d5555f/

Log:    fix the test

diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -1153,20 +1153,21 @@
                 operr.w_type,
                 operr.get_w_value(self.space),
                 w_traceback)
-            self.last_exception = old_last_exception
+            self.pushvalue(SApplicationException(old_last_exception))
         else:
             w_res = self.call_contextmanager_exit_function(
                 w_exitfunc,
                 self.space.w_None,
                 self.space.w_None,
                 self.space.w_None)
-        self.pushvalue(w_unroller)
+            self.pushvalue(self.space.w_None)
         self.pushvalue(w_res)
 
     def WITH_CLEANUP_FINISH(self, oparg, next_instr):
         w_suppress = self.popvalue()
         w_unroller = self.popvalue()
         if isinstance(w_unroller, SApplicationException):
+            self.last_exception = w_unroller.operr
             if self.space.is_true(w_suppress):
                 # __exit__() returned True -> Swallow the exception.
                 self.settopvalue(self.space.w_None)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to