From 7b79e4b6698ec65118d111e72180184b0dc17622 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 9 Apr 2020 23:50:08 +0200 Subject: [PATCH] Support for multiple positional arguments on utils.run() --- platypush/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/utils/__init__.py b/platypush/utils/__init__.py index e607877e..1ad57833 100644 --- a/platypush/utils/__init__.py +++ b/platypush/utils/__init__.py @@ -290,12 +290,12 @@ def is_functional_hook(obj) -> bool: return callable(obj) and hasattr(obj, 'hook') -def run(action, **kwargs): +def run(action, *args, **kwargs): from platypush.context import get_plugin (module_name, method_name) = get_module_and_method_from_action(action) plugin = get_plugin(module_name) method = getattr(plugin, method_name) - return method(**kwargs) + return method(*args, **kwargs) # vim:sw=4:ts=4:et: