Remove unhandled_okay from kwargs if it's there before passing to functions.
This commit is contained in:
parent
cdc821eb74
commit
0a5c6ec901
@ -307,13 +307,15 @@ def callable_runone(hookname, *args, **kwargs):
|
|||||||
"""
|
"""
|
||||||
callables = PluginManager().get_hook_callables(hookname)
|
callables = PluginManager().get_hook_callables(hookname)
|
||||||
|
|
||||||
|
unhandled_okay = kwargs.pop("unhandled_okay", False)
|
||||||
|
|
||||||
for callable in callables:
|
for callable in callables:
|
||||||
try:
|
try:
|
||||||
return callable(*args, **kwargs)
|
return callable(*args, **kwargs)
|
||||||
except CantHandleIt:
|
except CantHandleIt:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if kwargs.get("unhandled_okay", False) is False:
|
if unhandled_okay is False:
|
||||||
raise UnhandledCallable(
|
raise UnhandledCallable(
|
||||||
"No hooks registered capable of handling '%s'" % hookname)
|
"No hooks registered capable of handling '%s'" % hookname)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user