Changeset 13b5e44 in trunk
- Timestamp:
- 2010-07-19T07:54:26Z (15 years ago)
- Branches:
- master
- Children:
- 255c545
- Parents:
- 461f9464
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/util/happinessutil.py ¶
r461f9464 r13b5e44 3 3 reporting it in messages 4 4 """ 5 6 from copy import deepcopy 5 7 6 8 def failure_message(peer_count, k, happy, effective_happy): … … 61 63 set of PeerTrackers, returning the resulting dict. 62 64 """ 65 # Since we mutate servermap, and are called outside of a 66 # context where it is okay to do that, make a copy of servermap and 67 # work with it. 68 servermap = deepcopy(servermap) 63 69 if not used_peers: 64 70 return servermap … … 67 73 assert(isinstance(used_peers, set)) 68 74 69 # Since we mutate servermap, and are called outside of a70 # context where it is okay to do that, make a copy of servermap and71 # work with it.72 servermap = servermap.copy()73 75 for peer in used_peers: 74 76 for shnum in peer.buckets:
Note: See TracChangeset
for help on using the changeset viewer.