Make a copy of the procedure arguments before expanding the values from the context, or we'll permanently overwrite the procedure arguments with expanded values
This commit is contained in:
parent
1103e417e1
commit
f8e5515640
1 changed files with 4 additions and 3 deletions
|
@ -121,11 +121,12 @@ class Procedure(object):
|
||||||
n_tries -- Number of tries in case of failure before raising a RuntimeError
|
n_tries -- Number of tries in case of failure before raising a RuntimeError
|
||||||
"""
|
"""
|
||||||
if self.args:
|
if self.args:
|
||||||
for (k,v) in self.args.items():
|
args = self.args.copy()
|
||||||
|
for (k,v) in args.items():
|
||||||
v = Request.expand_value_from_context(v, **context)
|
v = Request.expand_value_from_context(v, **context)
|
||||||
self.args[k] = v
|
args[k] = v
|
||||||
context[k] = v
|
context[k] = v
|
||||||
logger.info('Executing procedure {} with arguments {}'.format(self.name, self.args))
|
logger.info('Executing procedure {} with arguments {}'.format(self.name, args))
|
||||||
else:
|
else:
|
||||||
logger.info('Executing procedure {}'.format(self.name))
|
logger.info('Executing procedure {}'.format(self.name))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue