From 0b053bb46d8c88e99a1c847cf38df46c5270ee9b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 5 Oct 2018 09:38:34 +0200 Subject: [PATCH] Expanding procedure arguments from context --- platypush/procedure/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platypush/procedure/__init__.py b/platypush/procedure/__init__.py index 45a83874..9d4a79f2 100644 --- a/platypush/procedure/__init__.py +++ b/platypush/procedure/__init__.py @@ -121,9 +121,11 @@ class Procedure(object): n_tries -- Number of tries in case of failure before raising a RuntimeError """ if self.args: - logger.info('Executing procedure {} with arguments {}'.format(self.name, self.args)) for (k,v) in self.args.items(): + v = Request.expand_value_from_context(v, **context) + self.args[k] = v context[k] = v + logger.info('Executing procedure {} with arguments {}'.format(self.name, self.args)) else: logger.info('Executing procedure {}'.format(self.name))