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 #68
  • Loading branch information
Tyler Goodlet committed Aug 29, 2017
1 parent 5ab312c commit e8fe1be
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[0] if result else None

return outcome.get_result()

Expand Down

0 comments on commit e8fe1be

Please sign in to comment.