From: Brian Warner Date: Wed, 29 Nov 2006 00:10:49 +0000 (-0700) Subject: fix delete X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~551 X-Git-Url: https://git.rkrishnan.org/pf/content/%22news.html/-?a=commitdiff_plain;h=182a0e8de09ec521a81075807b3150c1494b713a;p=tahoe-lafs%2Ftahoe-lafs.git fix delete --- diff --git a/simulator.py b/simulator.py index 31335cdd..a93d44d0 100644 --- a/simulator.py +++ b/simulator.py @@ -35,7 +35,7 @@ class Node: while numshares and permuted: pid,node = permuted.pop(0) tried += 1 - last_givento = node + last_givento = pid if node.accept_share(fileid, sharesize): givento.append((pid,node)) numshares -= 1 @@ -132,11 +132,11 @@ class Queen: return permuted def delete(self, fileid): - peers = self.permute_peers(fileid) + permuted = self.permute_peers(fileid) size, tried, last_givento = self.living_files[fileid] - peer = "" - while tried and peer < last_givento: - peer,node = permuted.pop(0) + pid = "" + while tried and pid < last_givento: + pid,node = permuted.pop(0) had_it = node.delete_share(fileid) if had_it: tried -= 1