From 41f58b69d81ab19ecd6ce307729d56ae873fdcf9 Mon Sep 17 00:00:00 2001 From: Ryan Fitzpatrick Date: Wed, 6 Dec 2017 16:52:11 -0500 Subject: [PATCH] Avoid calling None in call_historic --- pluggy/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pluggy/__init__.py b/pluggy/__init__.py index 42d2220b..fa012905 100644 --- a/pluggy/__init__.py +++ b/pluggy/__init__.py @@ -626,6 +626,8 @@ def call_historic(self, proc=None, kwargs=None): self._call_history.append((kwargs or {}, proc)) # historizing hooks don't return results res = self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) + if proc is None: + return for x in res or []: proc(x)