From: Brian Warner Date: Mon, 23 Jun 2014 20:54:07 +0000 (-0700) Subject: hush current pyflakes warnings (list comprehensions) X-Git-Tag: allmydata-tahoe-1.10.1a1~178 X-Git-Url: https://git.rkrishnan.org/components/%22news.html/simplejson/index.php?a=commitdiff_plain;h=99479226edc007ad174d605e63355e2e907a8acb;p=tahoe-lafs%2Ftahoe-lafs.git hush current pyflakes warnings (list comprehensions) closes #2245 --- diff --git a/misc/operations_helpers/find-share-anomalies.py b/misc/operations_helpers/find-share-anomalies.py index 76fe3419..8dca5113 100644 --- a/misc/operations_helpers/find-share-anomalies.py +++ b/misc/operations_helpers/find-share-anomalies.py @@ -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] diff --git a/src/allmydata/immutable/downloader/node.py b/src/allmydata/immutable/downloader/node.py index e852fd35..fe00fdbd 100644 --- a/src/allmydata/immutable/downloader/node.py +++ b/src/allmydata/immutable/downloader/node.py @@ -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 diff --git a/src/allmydata/scripts/tahoe_cp.py b/src/allmydata/scripts/tahoe_cp.py index 1ad460d8..cf421ae0 100644 --- a/src/allmydata/scripts/tahoe_cp.py +++ b/src/allmydata/scripts/tahoe_cp.py @@ -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))]) diff --git a/src/allmydata/storage/expirer.py b/src/allmydata/storage/expirer.py index 41823e7e..a284d4f7 100644 --- a/src/allmydata/storage/expirer.py +++ b/src/allmydata/storage/expirer.py @@ -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 diff --git a/src/allmydata/test/check_load.py b/src/allmydata/test/check_load.py index 197b3697..4674844b 100644 --- a/src/allmydata/test/check_load.py +++ b/src/allmydata/test/check_load.py @@ -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 ] ) diff --git a/src/allmydata/web/status.py b/src/allmydata/web/status.py index 89e6b640..b363f857 100644 --- a/src/allmydata/web/status.py +++ b/src/allmydata/web/status.py @@ -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 #