From 69c0f468919646662411b6d211d27af016282b93 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 27 Jan 2016 19:23:36 +0000 Subject: [PATCH] Allow deepcopies of NamespacedDictWrapper in python 2.6 --- salt/utils/context.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/salt/utils/context.py b/salt/utils/context.py index eefa3a61a0..aee12aad30 100644 --- a/salt/utils/context.py +++ b/salt/utils/context.py @@ -191,3 +191,7 @@ class NamespacedDictWrapper(collections.MutableMapping, dict): def __iter__(self): return iter(self._dict()) + + def __deepcopy__(self, memo): + return type(self)(copy.deepcopy(self.__dict, memo), + copy.deepcopy(self.pre_keys, memo))