From: Brian Warner Date: Thu, 2 May 2013 02:09:07 +0000 (-0700) Subject: minor changes to hush newer pyflakes X-Git-Tag: allmydata-tahoe-1.10.1a1~249 X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/COPYING.GPL?a=commitdiff_plain;h=2b6975d3a48e2328c6f63cdcc51b0b79c82d5223;p=tahoe-lafs%2Ftahoe-lafs.git minor changes to hush newer pyflakes apparently it can now detect aliasing from inside list comprehensions --- diff --git a/src/allmydata/immutable/downloader/node.py b/src/allmydata/immutable/downloader/node.py index 2dfbcf7f..e852fd35 100644 --- a/src/allmydata/immutable/downloader/node.py +++ b/src/allmydata/immutable/downloader/node.py @@ -514,9 +514,9 @@ class DownloadNode: if t[0] != segnum] return retire - def _cancel_request(self, c): + def _cancel_request(self, cancel): self._segment_requests = [t for t in self._segment_requests - if t[2] != c] + if t[2] != cancel] segnums = [segnum for (segnum,d,c,seg_ev,lp) in self._segment_requests] # self._active_segment might be None in rare circumstances, so make # sure we tolerate it diff --git a/src/allmydata/test/test_util.py b/src/allmydata/test/test_util.py index 3e2fa11a..03c9b01d 100644 --- a/src/allmydata/test/test_util.py +++ b/src/allmydata/test/test_util.py @@ -1986,7 +1986,7 @@ class StringSpans(unittest.TestCase): self.failUnlessEqual(ds.len(), 0) self.failUnlessEqual(list(ds._dump()), []) self.failUnlessEqual(sum([len(d) for (s,d) in ds.get_chunks()]), 0) - s = ds.get_spans() + s1 = ds.get_spans() self.failUnlessEqual(ds.get(0, 4), None) self.failUnlessEqual(ds.pop(0, 4), None) ds.remove(0, 4) @@ -1995,8 +1995,8 @@ class StringSpans(unittest.TestCase): self.failUnlessEqual(ds.len(), 4) self.failUnlessEqual(list(ds._dump()), [2,3,4,5]) self.failUnlessEqual(sum([len(d) for (s,d) in ds.get_chunks()]), 4) - s = ds.get_spans() - self.failUnless((2,2) in s) + s1 = ds.get_spans() + self.failUnless((2,2) in s1) self.failUnlessEqual(ds.get(0, 4), None) self.failUnlessEqual(ds.pop(0, 4), None) self.failUnlessEqual(ds.get(4, 4), None)