]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
hush current pyflakes warnings (list comprehensions)
authorBrian Warner <warner@lothar.com>
Mon, 23 Jun 2014 20:54:07 +0000 (13:54 -0700)
committerBrian Warner <warner@lothar.com>
Mon, 23 Jun 2014 20:54:07 +0000 (13:54 -0700)
closes #2245

misc/operations_helpers/find-share-anomalies.py
src/allmydata/immutable/downloader/node.py
src/allmydata/scripts/tahoe_cp.py
src/allmydata/storage/expirer.py
src/allmydata/test/check_load.py
src/allmydata/web/status.py

index 76fe3419f2d47a5923b1bdfdcd592a4180dee15c..8dca5113694ef58581feb2ce545e01622d619d14 100644 (file)
@@ -29,6 +29,7 @@ for catalog in sys.argv[1:]:
             sdmf_versions[si][0].add( ver )
             sdmf_versions[si][1].add( line )
 
+del si
 chk_multiple_encodings = [(si,lines)
                           for si,(encodings,lines) in chk_encodings.items()
                           if len(encodings) > 1]
index e852fd35e3d22a5f2015a3b7c57561b2f481024b..fe00fdbd9a3f3ead55dd614bcbb1268475399950 100644 (file)
@@ -56,8 +56,7 @@ class DownloadNode:
         self._history = history
         self._download_status = download_status
 
-        k, N = self._verifycap.needed_shares, self._verifycap.total_shares
-        self.share_hash_tree = IncompleteHashTree(N)
+        self.share_hash_tree = IncompleteHashTree(self._verifycap.total_shares)
 
         # we guess the segment size, so Segmentation can pull non-initial
         # segments in a single roundtrip. This populates
index 1ad460d897403bec53ebc147dc1ecc8c95336b05..cf421ae0dce5b8a03f2f643d09c4a2c93a844783 100644 (file)
@@ -469,6 +469,7 @@ class Copier:
             name, source = self.get_source_info(ss)
             sources.append( (name, source) )
 
+        del name
         have_source_dirs = bool([s for (name,s) in sources
                                  if isinstance(s, (LocalDirectorySource,
                                                    TahoeDirectorySource))])
index 41823e7e4285f163b6e6119157e0fc8992e19f3c..a284d4f74395e6d1985d7c6c438fae514473dfee 100644 (file)
@@ -144,6 +144,7 @@ class LeaseCheckingCrawler(ShareCrawler):
         self.increment(rec, "examined-buckets", 1)
         if sharetype:
             self.increment(rec, "examined-buckets-"+sharetype, 1)
+        del wks
 
         try:
             bucket_diskbytes = s.st_blocks * 512
index 197b36971df03ccdf822b992adf376af0e410d40..4674844b8b99e3862cc5cd5574fe9fe274e69a39 100644 (file)
@@ -52,6 +52,7 @@ if sys.argv[1] == "--stats":
                 if name not in stats:
                     stats[name] = 0
                 stats[name] += float(value)
+        del name
         if last_stats:
             delta = dict( [ (name,stats[name]-last_stats[name])
                             for name in stats ] )
index 89e6b6404736267126149d15e9eb032affb9c9ff..b363f857c50e04327b1345d24406bd7af685d8ca 100644 (file)
@@ -428,6 +428,7 @@ class DownloadStatusPage(DownloadResultsRendererMixin, rend.Page):
                 rows[free_slot] = ev["finish_time"]
             ev["row"] = (groupnum, free_slot)
             new_events.append(ev)
+        del groupnum
         # maybe also return serverid_to_group, groupnum_to_rows, and some
         # indication of the highest finish_time
         #