Skip to content

Commit

Permalink
Handle firstresult hooks that return None
Browse files Browse the repository at this point in the history
Only return the first result when at least one result has been returned
by underlying hook implementations.

Fixes pytest-dev#68
  • Loading branch information
Tyler Goodlet committed Aug 29, 2017
1 parent 804f1ab commit 6954151
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pluggy/callers.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def execute(self):
pass

if firstresult:
return outcome.get_result()[0]
result = outcome.get_result()
return result if result else None

return outcome.get_result()

Expand Down

0 comments on commit 6954151

Please sign in to comment.