From: Zac Medico Date: Tue, 26 Dec 2006 02:43:49 +0000 (-0000) Subject: Make _setitem do a deepcopy just in case. X-Git-Tag: v2.1.2~213 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=07e1f307333b97d2c133211ce774f1f07573d845;p=portage.git Make _setitem do a deepcopy just in case. svn path=/main/trunk/; revision=5394 --- diff --git a/pym/cache/volatile.py b/pym/cache/volatile.py index 068a4b817..0a204b70f 100644 --- a/pym/cache/volatile.py +++ b/pym/cache/volatile.py @@ -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])