diff options
Diffstat (limited to 'mediagoblin/tools/pluginapi.py')
-rw-r--r-- | mediagoblin/tools/pluginapi.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mediagoblin/tools/pluginapi.py b/mediagoblin/tools/pluginapi.py index 2c0394aa..283350a8 100644 --- a/mediagoblin/tools/pluginapi.py +++ b/mediagoblin/tools/pluginapi.py @@ -307,13 +307,15 @@ def callable_runone(hookname, *args, **kwargs): """ callables = PluginManager().get_hook_callables(hookname) + unhandled_okay = kwargs.pop("unhandled_okay", False) + for callable in callables: try: return callable(*args, **kwargs) except CantHandleIt: continue - if kwargs.get("unhandled_okay", False) is False: + if unhandled_okay is False: raise UnhandledCallable( "No hooks registered capable of handling '%s'" % hookname) |