From: david-sarah Date: Fri, 7 Oct 2011 03:30:31 +0000 (+0000) Subject: Fix pyflakes warnings in misc/ directories other than misc/build_helpers. refs #1557 X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=bac24aee0dab5b23af66d5a21d1e15d523f35025;p=tahoe-lafs%2Ftahoe-lafs.git Fix pyflakes warnings in misc/ directories other than misc/build_helpers. refs #1557 --- diff --git a/misc/coding_tools/check-interfaces.py b/misc/coding_tools/check-interfaces.py index 15e7d99b..7fdaa5a8 100644 --- a/misc/coding_tools/check-interfaces.py +++ b/misc/coding_tools/check-interfaces.py @@ -105,7 +105,7 @@ def check(): $Id$ """ -from zope.interface.exceptions import BrokenImplementation, DoesNotImplement +from zope.interface.exceptions import DoesNotImplement from zope.interface.exceptions import BrokenMethodImplementation from types import FunctionType, MethodType from zope.interface.interface import fromMethod, fromFunction, Method diff --git a/misc/operations_helpers/spacetime/diskwatcher.py b/misc/operations_helpers/spacetime/diskwatcher.py index 05a68ac9..6674017a 100644 --- a/misc/operations_helpers/spacetime/diskwatcher.py +++ b/misc/operations_helpers/spacetime/diskwatcher.py @@ -20,7 +20,6 @@ class Sample(Item): avail = integer() def upgradeSample1to2(old): - total = 0 return old.upgradeVersion("diskwatcher_sample", 1, 2, url=old.url, when=old.when, diff --git a/misc/simulators/ringsim.py b/misc/simulators/ringsim.py index 46480c44..74c603a6 100644 --- a/misc/simulators/ringsim.py +++ b/misc/simulators/ringsim.py @@ -2,9 +2,9 @@ # used to discuss ticket #302: "stop permuting peerlist?" -import time +# import time import math -from hashlib import sha1, md5, sha256 +from hashlib import md5 # sha1, sha256 myhash = md5 # md5: 1520 "uploads" per second # sha1: 1350 ups @@ -168,7 +168,6 @@ class Options(usage.Options): def do_run(ring, opts): avg_space_per_file = avg_filesize * opts["N"] / opts["k"] fileseed = opts["fileseed"] - start = time.time() all_servers_have_room = True no_files_have_wrapped = True for filenum in count(0): @@ -228,7 +227,7 @@ def do_ring(opts): seed = opts["seed"] ring = Ring(opts["servers"], seed, opts["permute"]) - num_files = do_run(ring, opts) + do_run(ring, opts) def run(opts): do_ring(opts) diff --git a/misc/simulators/simulator.py b/misc/simulators/simulator.py index adf674de..10a5494f 100644 --- a/misc/simulators/simulator.py +++ b/misc/simulators/simulator.py @@ -54,7 +54,6 @@ class Node: return (True, tried) def accept_share(self, fileid, sharesize): - accept = False if self.utilization < self.capacity: # we have room! yay! self.shares[fileid] = sharesize @@ -244,7 +243,7 @@ class Simulator: def do_event(self): time, etype = self.next.pop(0) assert time > self.time - current_time = self.time + # current_time = self.time self.time = time self._add_event(etype) if etype == "ADDFILE":