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:20:33 -07:00
parent 57cccd75d0
commit 6114df8dc3

View File

@ -845,7 +845,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)
if key is not 'kwargs':
kwargs['__pub_{0}'.format(key)] = copy.deepcopy(val)
ret['return'] = self.functions[func](*args, **kwargs)