mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-08 19:34:18 +00:00
trivial: fix a bunch of pyflakes complaints
This commit is contained in:
parent
821e64203c
commit
c35a6ee3a2
@ -1,18 +1,13 @@
|
||||
from twisted.internet import defer
|
||||
from twisted.python import failure
|
||||
from foolscap import DeadReferenceError
|
||||
from allmydata import hashtree, storage
|
||||
from allmydata import hashtree
|
||||
from allmydata.checker_results import CheckerResults
|
||||
from allmydata.immutable import download
|
||||
from allmydata.uri import CHKFileVerifierURI
|
||||
from allmydata.util.assertutil import precondition
|
||||
from allmydata.util import base32, deferredutil, hashutil, log, nummedobj, rrefutil
|
||||
from allmydata.util import base32, deferredutil, log, rrefutil
|
||||
|
||||
from allmydata.immutable import layout
|
||||
|
||||
def _permute_servers(servers, key):
|
||||
return sorted(servers, key=lambda x: sha.new(key+x[0]).digest())
|
||||
|
||||
class Checker(log.PrefixingLogMixin):
|
||||
""" I query all servers to see if M uniquely-numbered shares are available.
|
||||
|
||||
|
@ -9,7 +9,6 @@ from foolscap.eventual import eventually
|
||||
from allmydata.interfaces import IFileNode, IFileURI, ICheckable, \
|
||||
IDownloadTarget
|
||||
from allmydata.util import log, base32
|
||||
from allmydata.uri import from_string as uri_from_string
|
||||
from allmydata.immutable.checker import Checker
|
||||
from allmydata.checker_results import CheckAndRepairResults
|
||||
from allmydata.immutable.repairer import Repairer
|
||||
|
@ -1,15 +1,14 @@
|
||||
from twisted.internet import defer
|
||||
from twisted.python import failure
|
||||
from allmydata import storage
|
||||
from allmydata.checker_results import CheckerResults, CheckAndRepairResults
|
||||
from allmydata.immutable import download
|
||||
from allmydata.util import base32, hashutil, log, nummedobj
|
||||
from allmydata.util import nummedobj
|
||||
from allmydata.util.assertutil import precondition
|
||||
from allmydata.uri import CHKFileVerifierURI
|
||||
|
||||
from allmydata.immutable import layout
|
||||
|
||||
import sha
|
||||
import sha, time
|
||||
|
||||
def _permute_servers(servers, key):
|
||||
return sorted(servers, key=lambda x: sha.new(key+x[0]).digest())
|
||||
@ -144,7 +143,7 @@ class Repairer(LogMixin):
|
||||
self._results.timings["peer_selection"] = now - self._started
|
||||
|
||||
if len(self._share_buckets) < self._num_needed_shares:
|
||||
raise NotEnoughSharesError
|
||||
raise download.NotEnoughSharesError
|
||||
|
||||
def _verify_done(self, ignored):
|
||||
# TODO: The following results are just stubs, and need to be replaced
|
||||
|
Loading…
x
Reference in New Issue
Block a user