From 4751a468408d8cc8c0e7d8165237d128741ce08a Mon Sep 17 00:00:00 2001 From: Brian Warner <warner@lothar.com> Date: Thu, 4 Apr 2013 13:50:00 -0700 Subject: [PATCH] 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. --- src/allmydata/mutable/servermap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- 2.45.2