]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Fri Oct 7 04:30:31 BST 2011 david-sarah@jacaranda.org
authorDaira Hopwood <daira@jacaranda.org>
Thu, 5 Sep 2013 18:12:20 +0000 (19:12 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 5 Sep 2013 18:12:20 +0000 (19:12 +0100)
  * Fix pyflakes warnings in misc/ directories other than misc/build_helpers. refs #1557

misc/coding_tools/check-interfaces.py
misc/operations_helpers/spacetime/diskwatcher.py
misc/simulators/ringsim.py
misc/simulators/simulator.py

index fd6a9059927d1df876815a86aa0acaad0ebc4a63..6400bfe7de2949917fd007b64aa481eceb758b8b 100644 (file)
@@ -122,7 +122,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
index 05a68ac9e5717a57f6042a2007b886cac5f2db57..6674017a1f09d26eb269f501073adb22e349b1a1 100644 (file)
@@ -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,
index 46480c44313aa6a1debb29a82b828ae186257715..74c603a6666a5a2c86787cac1b4b54d4741b9cd6 100644 (file)
@@ -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)
index fa97f87f8ab5faf4778bb746f1c94f3ffbbd6fa5..972c95827c05077288fe2e9603ebc878202ce36a 100644 (file)
@@ -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":