Adding a small check to ensure we do not continue to populate kwargs with __pub_ items from the kwargs item.

This commit is contained in:
Gareth J. Greenaway 2017-09-11 11:22:26 -07:00
parent a9592dd3e2
commit 3fd59ed369

View file

@ -842,7 +842,8 @@ class Schedule(object):
if argspec.keywords:
# this function accepts **kwargs, pack in the publish data
for key, val in six.iteritems(ret):
kwargs['__pub_{0}'.format(key)] = copy.deepcopy(val)
is key is not 'kwargs':
kwargs['__pub_{0}'.format(key)] = copy.deepcopy(val)
ret['return'] = self.functions[func](*args, **kwargs)