From: Zooko O'Whielacronx Date: Mon, 3 Dec 2007 22:42:35 +0000 (-0700) Subject: fix several bugs and warnings -- thanks, pyflakes X-Git-Url: https://git.rkrishnan.org/schema.xhtml?a=commitdiff_plain;h=3605354a952d8efd11d72ffac46045f0af44ea87;p=tahoe-lafs%2Ftahoe-lafs.git fix several bugs and warnings -- thanks, pyflakes --- diff --git a/src/allmydata/client.py b/src/allmydata/client.py index 67ad34eb..fa91cd1f 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -18,7 +18,6 @@ from allmydata.checker import Checker from allmydata.control import ControlServer from allmydata.introducer import IntroducerClient from allmydata.util import hashutil, idlib, testutil, observer -from allmydata.util.assertutil import precondition from allmydata.filenode import FileNode from allmydata.dirnode2 import NewDirectoryNode from allmydata.mutable import MutableFileNode diff --git a/src/allmydata/dirnode2.py b/src/allmydata/dirnode2.py index 17b6b9c7..5a1cecdb 100644 --- a/src/allmydata/dirnode2.py +++ b/src/allmydata/dirnode2.py @@ -3,11 +3,10 @@ import os from zope.interface import implements from twisted.internet import defer -from twisted.python import log import simplejson from allmydata.mutable import NotMutableError from allmydata.interfaces import IMutableFileNode, IDirectoryNode,\ - INewDirectoryURI, IURI, IFileNode, \ + IURI, IFileNode, \ IVerifierURI from allmydata.util import hashutil from allmydata.util.hashutil import netstring diff --git a/src/allmydata/storage.py b/src/allmydata/storage.py index 6d91c3eb..1e99fcef 100644 --- a/src/allmydata/storage.py +++ b/src/allmydata/storage.py @@ -4,7 +4,6 @@ from itertools import chain from foolscap import Referenceable from twisted.application import service from twisted.internet import defer -from twisted.python import log from zope.interface import implements from allmydata.interfaces import RIStorageServer, RIBucketWriter, \ diff --git a/src/allmydata/test/test_mutable.py b/src/allmydata/test/test_mutable.py index fc93d1c3..22149eef 100644 --- a/src/allmydata/test/test_mutable.py +++ b/src/allmydata/test/test_mutable.py @@ -7,7 +7,7 @@ from allmydata import mutable, uri, dirnode2 from allmydata.dirnode2 import split_netstring from allmydata.util.hashutil import netstring, tagged_hash from allmydata.encode import NotEnoughPeersError -from allmydata.interfaces import IURI, INewDirectoryURI, IDirnodeURI, \ +from allmydata.interfaces import IURI, INewDirectoryURI, \ IMutableFileURI import sha @@ -60,7 +60,7 @@ class FakeFilenode(mutable.MutableFileNode): mutable.MutableFileNode.init_from_uri(self, myuri) return self def replace(self, newdata, wait_for_numpeers=None): - self.all_contents[self.get_uri()] = initial_contents + self.all_contents[self.get_uri()] = newdata return defer.succeed(self) def _generate_pubprivkeys(self): count = self.counter.next() diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index c772b202..9b0b5e0c 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -5,7 +5,7 @@ from cStringIO import StringIO from twisted.python import usage, runtime from twisted.internet import defer import os.path -from allmydata.scripts import runner, debug +from allmydata.scripts import runner from allmydata.util import fileutil, testutil class CreateNode(unittest.TestCase): diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index 84ec7918..cfdc76b3 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -1231,7 +1231,7 @@ class Root(rend.Page): d.addErrback(_trap_KeyError) return d elif segments[0] == "xmlrpc": - raise NotYetImplementedError() + raise NotImplementedError() return rend.Page.locateChild(self, ctx, segments) child_webform_css = webform.defaultCSS