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 Nov 4, 2024
1 parent d249bd5 commit ea049ed
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:

Check warning on line 47 in src/pluggy/_callers.py

View check run for this annotation

Codecov / codecov/patch

src/pluggy/_callers.py#L47

Added line #L47 was not covered by tests
teardown.close()
return result.get_result()


def _raise_wrapfail(
Expand Down

0 comments on commit ea049ed

Please sign in to comment.