From 69541515b9f208f01fe9ded8ee2e4a730f47f2ed Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 29 Aug 2017 10:09:02 -0400 Subject: [PATCH] Handle firstresult hooks that return None Only return the first result when at least one result has been returned by underlying hook implementations. Fixes #68 --- pluggy/callers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pluggy/callers.py b/pluggy/callers.py index abe36e78..20079e70 100644 --- a/pluggy/callers.py +++ b/pluggy/callers.py @@ -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()