Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r88211:40d99b61ca87
Date: 2016-11-08 13:32 +0100
http://bitbucket.org/pypy/pypy/changeset/40d99b61ca87/

Log:    Move the exception-catching scope to also include the call for
        generators

diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -277,13 +277,12 @@
                     next_instr = r_uint(self.last_instr + 1)
                     if next_instr != 0:
                         self.pushvalue(w_inputvalue)
-                try:
-                    w_exitvalue = self.dispatch(self.pycode, next_instr,
-                                                executioncontext)
-                except OperationError:
-                    raise
-                except Exception as e:      # general fall-back
-                    raise self._convert_unexpected_exception(e)
+                w_exitvalue = self.dispatch(self.pycode, next_instr,
+                                            executioncontext)
+            except OperationError:
+                raise
+            except Exception as e:      # general fall-back
+                raise self._convert_unexpected_exception(e)
             finally:
                 executioncontext.return_trace(self, w_exitvalue)
             # it used to say self.last_exception = None
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to