From: Zooko O'Whielacronx Date: Sun, 18 Jan 2009 17:56:08 +0000 (-0700) Subject: trivial: whitespace X-Git-Tag: allmydata-tahoe-1.3.0~179 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/%22doc.html/vdrive?a=commitdiff_plain;h=ce7c448bc0295c4796900abe294fd9330e8c694c;p=tahoe-lafs%2Ftahoe-lafs.git trivial: whitespace I ran emacs's "M-x whitespace-cleanup" on the files that Toby's recent patch had touched that had trailing whitespace on some lines. --- diff --git a/src/allmydata/test/test_ambient_upload_authority.py b/src/allmydata/test/test_ambient_upload_authority.py index 9c4d9a29..8e70af78 100644 --- a/src/allmydata/test/test_ambient_upload_authority.py +++ b/src/allmydata/test/test_ambient_upload_authority.py @@ -14,19 +14,19 @@ class TestCase(SystemTestMixin, unittest.TestCase): self.ambientUploadAuthority = ambientUploadAuthority def _test_ambient_upload_authority(self): - self.webip = "127.0.0.1" + self.webip = "127.0.0.1" self.webport = 3456 self.basedir = self.mktemp() # set up an introducer and a node d = self.set_up_nodes(1) - d.addCallback(self._test_ambient_upload_authority2) + d.addCallback(self._test_ambient_upload_authority2) d.addErrback(self.fail) return d def _set_up_nodes_extra_config(self): # we need to remove the 'webport' old-style config file - # or else the node won't start + # or else the node won't start os.remove(os.path.join(self.getdir("client0"), "webport")) f = open(os.path.join(self.getdir("client0"), "tahoe.cfg"), "wt") f.write("\n") @@ -41,8 +41,8 @@ class TestCase(SystemTestMixin, unittest.TestCase): f.write("enabled = true\n") f.write("\n") f.close() - - + + def _test_ambient_upload_authority2(self, ignored=None): content_type = 'multipart/form-data; boundary=----------ThIs_Is_tHe_bouNdaRY_$' body = '------------ThIs_Is_tHe_bouNdaRY_$\r\nContent-Disposition: form-data; name="t"\r\n\r\nupload\r\n------------ThIs_Is_tHe_bouNdaRY_$\r\nContent-Disposition: form-data; name="file"; filename="file1.txt"\r\nContent-Type: application/octet-stream\r\n\r\nsome test text\r\n------------ThIs_Is_tHe_bouNdaRY_$--\r\n' @@ -60,7 +60,7 @@ class TestCase(SystemTestMixin, unittest.TestCase): f.deferred.addErrback(self._cbCheckResponse,[f,expected]) deferreds.append(f.deferred) reactor.connectTCP(self.webip, self.webport, f) - + tryRequest("uri","PUT","non contents\r\n") tryRequest("uri?t=mkdir","PUT") tryRequest("uri?t=mkdir","POST") @@ -77,8 +77,8 @@ class TestCase(SystemTestMixin, unittest.TestCase): r = cmp[0] expected = cmp[1] self.failUnless(int(r.status) == expected) - - + + class TestAmbientUploadAuthorityEnabled(TestCase): def setUp(self): TestCase.setUp(self) @@ -94,4 +94,3 @@ class TestAmbientUploadAuthorityDisabled(TestCase): def test_ambient_upload_authority_disabled(self): return self._test_ambient_upload_authority() - diff --git a/src/allmydata/web/root.py b/src/allmydata/web/root.py index 7413b132..15533b8e 100644 --- a/src/allmydata/web/root.py +++ b/src/allmydata/web/root.py @@ -1,4 +1,3 @@ - import time from twisted.internet import address @@ -22,7 +21,7 @@ from allmydata.web.common import abbreviate_size, IClient, \ class URIHandler(RenderMixin, rend.Page): # I live at /uri . There are several operations defined on /uri itself, # mostly involved with creation of unlinked files and directories. - + def setAmbientUploadAuthority(self, ambientUploadAuthority): self.ambientUploadAuthority = ambientUploadAuthority diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index 74e5ba43..2675aa04 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -1,4 +1,3 @@ - import time from twisted.application import service, strports, internet from twisted.web import http @@ -123,7 +122,7 @@ class WebishServer(service.MultiService): name = "webish" root_class = root.Root - def __init__(self, webport, nodeurl_path=None, staticdir=None, + def __init__(self, webport, nodeurl_path=None, staticdir=None, ambientUploadAuthority=False): service.MultiService.__init__(self) self.webport = webport