Skip to content

Commit

Permalink
Merge pull request #396 from bluetech/un-result-fixup
Browse files Browse the repository at this point in the history
callers: do `.close()` also in the `throw` case
  • Loading branch information
bluetech committed Jun 17, 2023
2 parents 40fbab1 + efe096a commit 054a787
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pluggy/_callers.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ def _multicall(
teardown.throw(outcome._exception)
else:
teardown.send(outcome._result)
# Following is unreachable for a well behaved hook wrapper.
# Try to force finalizers otherwise postponed till GC action.
# Note: close() may raise if generator handles GeneratorExit.
teardown.close()
# Following is unreachable for a well behaved hook wrapper.
# Try to force finalizers otherwise postponed till GC action.
# Note: close() may raise if generator handles GeneratorExit.
teardown.close()
except StopIteration as si:
outcome.force_result(si.value)
continue
Expand Down

0 comments on commit 054a787

Please sign in to comment.