Skip to content

Commit 09f8669

Browse files
WIP: move legacy hook result trigger outside of the except block
1 parent 6d83333 commit 09f8669

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pluggy/_callers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ def run_legacy_hookwrapper(
3838
try:
3939
teardown.send(result)
4040
except StopIteration:
41-
return result.get_result()
41+
pass
4242
except BaseException as e:
4343
_warn_teardown_exception(hook_name, hook_impl, e)
4444
raise
4545
else:
4646
_raise_wrapfail(teardown, "has second yield")
4747
finally:
4848
teardown.close()
49+
return result.get_result()
4950

5051

5152
def _raise_wrapfail(

0 commit comments

Comments
 (0)