]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
minor changes to hush newer pyflakes
authorBrian Warner <warner@lothar.com>
Thu, 2 May 2013 02:09:07 +0000 (19:09 -0700)
committerBrian Warner <warner@lothar.com>
Thu, 2 May 2013 02:09:07 +0000 (19:09 -0700)
apparently it can now detect aliasing from inside list comprehensions

src/allmydata/immutable/downloader/node.py
src/allmydata/test/test_util.py

index 2dfbcf7fe6afb9dee8b9efc2d0653d22eb3b7c32..e852fd35e3d22a5f2015a3b7c57561b2f481024b 100644 (file)
@@ -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
index 3e2fa11a60bc8ec474bef584df7ca5556849ea1f..03c9b01df56fd8f2bf88bb9640040121f24250e3 100644 (file)
@@ -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)