Skip to content

Commit

Permalink
WIP: move legacy hook result trigger outside of the except block
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Dec 21, 2024
1 parent 717b5d0 commit c8916fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pluggy/_callers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ def run_legacy_hookwrapper(
try:
teardown.send(result)
except StopIteration:
return result.get_result()
pass
except BaseException as e:
_warn_teardown_exception(hook_name, hook_impl, e)
raise
else:
_raise_wrapfail(teardown, "has second yield")
finally:
teardown.close()
return result.get_result()


def _raise_wrapfail(
Expand Down

0 comments on commit c8916fb

Please sign in to comment.