[pypy-commit] pypy py3.6: fix 585e24d5f093, it changed too much

mattip pypy.commits at gmail.com
Fri Sep 6 07:46:36 EDT 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r97387:f6fd62b9bbed
Date: 2019-09-06 13:45 +0200
http://bitbucket.org/pypy/pypy/changeset/f6fd62b9bbed/

Log:	fix 585e24d5f093, it changed too much

diff --git a/pypy/interpreter/generator.py b/pypy/interpreter/generator.py
--- a/pypy/interpreter/generator.py
+++ b/pypy/interpreter/generator.py
@@ -785,4 +785,7 @@
                 # StopIteration, signalling that this 'aclose()' await
                 # is done.
                 raise OperationError(space.w_StopIteration, space.w_None)
+        if e.match(space, space.w_GeneratorExit):
+            # Ignore this error.
+            raise OperationError(space.w_StopIteration, space.w_None)
         raise e


More information about the pypy-commit mailing list