Make _setitem do a deepcopy just in case.
authorZac Medico <zmedico@gentoo.org>
Tue, 26 Dec 2006 02:43:49 +0000 (02:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 26 Dec 2006 02:43:49 +0000 (02:43 -0000)
svn path=/main/trunk/; revision=5394

pym/cache/volatile.py

index 068a4b817907332407d30bfe7ad64891350d9048..0a204b70fb34ed15c26669311b47489e4d61045a 100644 (file)
@@ -17,9 +17,11 @@ class database(template.database):
                super(database, self).__init__(*args, **config)
                self._data = {}
                self.iterkeys = self._data.iterkeys
-               self._setitem = self._data.__setitem__
                self._delitem = self._data.__delitem__
                self.__contains__ = self._data.__contains__
 
+       def _setitem(self, name, values):
+               self._data[name] = copy.deepcopy(values)
+
        def _getitem(self, cpv):
                return copy.deepcopy(self._data[cpv])