From: Brian Warner Date: Thu, 4 Apr 2013 20:50:00 +0000 (-0700) Subject: ServerMap.copy(): deepcopy .update_data too. Closes #1785. X-Git-Tag: allmydata-tahoe-1.10b1~20 X-Git-Url: https://git.rkrishnan.org/frontends/simplejson/decoder.py.html?a=commitdiff_plain;h=4751a468408d8cc8c0e7d8165237d128741ce08a;p=tahoe-lafs%2Ftahoe-lafs.git ServerMap.copy(): deepcopy .update_data too. Closes #1785. This was apparently unused, but good to copy for completeness. Tests pass with and without the change. --- diff --git a/src/allmydata/mutable/servermap.py b/src/allmydata/mutable/servermap.py index 4ef85c58..149e1a25 100644 --- a/src/allmydata/mutable/servermap.py +++ b/src/allmydata/mutable/servermap.py @@ -1,5 +1,5 @@ -import sys, time +import sys, time, copy from zope.interface import implements from itertools import count from twisted.internet import defer @@ -134,6 +134,7 @@ class ServerMap: s._bad_shares = self._bad_shares.copy() # tuple->str s._last_update_mode = self._last_update_mode s._last_update_time = self._last_update_time + s.update_data = copy.deepcopy(self.update_data) return s def get_reachable_servers(self):