From 331b27712c4eae90b57a98ecff6dd76a70ea68c4 Mon Sep 17 00:00:00 2001 From: Nitin Madhok Date: Wed, 8 Jul 2015 02:24:29 -0400 Subject: [PATCH] Backporting fix for issue #25223 on 2015.8 branch --- salt/client/mixins.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/client/mixins.py b/salt/client/mixins.py index 35886ccd47..e1e16884f0 100644 --- a/salt/client/mixins.py +++ b/salt/client/mixins.py @@ -285,7 +285,9 @@ class SyncClientMixin(object): # Inject some useful globals to *all* the funciton's global # namespace only once per module-- not per func completed_funcs = [] - for mod_name in six.iterkeys(self.functions): + _functions = copy.deepcopy(self.functions) + + for mod_name in six.iterkeys(_functions): if '.' not in mod_name: continue mod, _ = mod_name.split('.', 1)