Skip to content

Commit 4978696

Browse files
author
Tyler Goodlet
committed
Handle gen exit properly
1 parent 9d1bab0 commit 4978696

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pluggy/callers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ def _itercall(hook_impls, caller_kwargs, specopts={}, hook=None):
238238
yield res
239239
if firstresult: # halt further impl calls
240240
break
241+
except GeneratorExit:
242+
pass # loop was terminated prematurely by caller
241243
except BaseException:
242244
excinfo = sys.exc_info()
243245
finally:

0 commit comments

Comments
 (0)