]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Remove all trailing whitespace from .py files.
authordavid-sarah <david-sarah@jacaranda.org>
Tue, 9 Aug 2011 00:11:17 +0000 (17:11 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Tue, 9 Aug 2011 00:11:17 +0000 (17:11 -0700)
src/allmydata/dirnode.py
src/allmydata/frontends/sftpd.py
src/allmydata/scripts/tahoe_cp.py
src/allmydata/scripts/tahoe_ls.py
src/allmydata/test/test_dirnode.py
src/allmydata/test/test_drop_upload.py
src/allmydata/test/test_encodingutil.py
src/allmydata/test/test_sftp.py
src/allmydata/test/test_web.py
src/allmydata/uri.py
src/allmydata/web/directory.py

index 022a6e00f6e4d602c805d34ac3ae22d3fe5f89b5..e422b67fe0d40a025654cf3cf17848b5dcca01f8 100644 (file)
@@ -546,7 +546,7 @@ class DirectoryNode:
                 writecap, readcap, metadata = e
             precondition(isinstance(writecap, (str,type(None))), writecap)
             precondition(isinstance(readcap, (str,type(None))), readcap)
-            
+
             # We now allow packing unknown nodes, provided they are valid
             # for this type of directory.
             child_node = self._create_and_validate_node(writecap, readcap, namex)
index 7301f281738d87c917e4583aceca50dc1787ff7d..328ed6e97de33d61d91b680098f1a3163c11f379 100644 (file)
@@ -799,7 +799,7 @@ class GeneralSFTPFile(PrefixingLogMixin):
         abandoned = self.abandoned
         parent = self.parent
         childname = self.childname
-        
+
         # has_changed is set when writeChunk is called, not when the write occurs, so
         # it is correct to optimize out the commit if it is False at the close call.
         has_changed = self.has_changed
@@ -1000,7 +1000,7 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
     def _abandon_any_heisenfiles(self, userpath, direntry):
         request = "._abandon_any_heisenfiles(%r, %r)" % (userpath, direntry)
         self.log(request, level=OPERATIONAL)
-        
+
         assert isinstance(userpath, str), userpath
 
         # First we synchronously mark all heisenfiles matching the userpath or direntry
index 694bf353bd8bf63f8aa6244ef71b4f65cadf875b..13537dc0a878a2eda35348e042bc0428302f4332 100644 (file)
@@ -502,7 +502,7 @@ class Copier:
             return self.copy_file(source, target)
 
         if isinstance(target, (LocalDirectoryTarget, TahoeDirectoryTarget)):
-            # We're copying to an existing directory -- make sure that we 
+            # We're copying to an existing directory -- make sure that we
             # have target names for everything
             for (name, source) in sources:
                 if name is None and isinstance(source, TahoeFileSource):
index 89ef3347a80bcd4ac88c6ccff491603be984f61f..e64e9d2049028df67c8ab3d4d0964f8a4004ce2f 100644 (file)
@@ -174,7 +174,7 @@ def list(options):
         piece += "s"
         fmt_pieces.append(piece)
     fmt = " ".join(fmt_pieces)
-    
+
     rc = 0
     for (encoding_error, row) in rows:
         if encoding_error:
index 59b31afbed4192fc0223eeef87f15cacf3f2dca1..6f715c99852b8d4b1b6e4a1131e17cb082eca33e 100644 (file)
@@ -92,7 +92,7 @@ class Dirnode(GridTestMixin, unittest.TestCase,
                 u"tiny_litdir": (nm.create_from_cap(tiny_litdir_uri), {}),
                 }
         d = c.create_dirnode(kids)
-        
+
         def _created(dn):
             self.failUnless(isinstance(dn, dirnode.DirectoryNode))
             self.failUnless(dn.is_mutable())
@@ -104,7 +104,7 @@ class Dirnode(GridTestMixin, unittest.TestCase,
             self.failUnless("RW-MUT" in rep)
             return dn.list()
         d.addCallback(_created)
-        
+
         def _check_kids(children):
             self.failUnlessReallyEqual(set(children.keys()),
                                        set([one_nfc, u"two", u"mut", u"fut", u"fro",
@@ -118,21 +118,21 @@ class Dirnode(GridTestMixin, unittest.TestCase,
             frona_node, frona_metadata = children[u"fro-unic"]
             emptylit_node, emptylit_metadata = children[u"empty_litdir"]
             tinylit_node, tinylit_metadata = children[u"tiny_litdir"]
-            
+
             self.failUnlessReallyEqual(one_node.get_size(), 3)
             self.failUnlessReallyEqual(one_node.get_uri(), one_uri)
             self.failUnlessReallyEqual(one_node.get_readonly_uri(), one_uri)
             self.failUnless(isinstance(one_metadata, dict), one_metadata)
-            
+
             self.failUnlessReallyEqual(two_node.get_size(), 14861)
             self.failUnlessReallyEqual(two_node.get_uri(), setup_py_uri)
             self.failUnlessReallyEqual(two_node.get_readonly_uri(), setup_py_uri)
             self.failUnlessEqual(two_metadata["metakey"], "metavalue")
-            
+
             self.failUnlessReallyEqual(mut_node.get_uri(), mut_write_uri)
             self.failUnlessReallyEqual(mut_node.get_readonly_uri(), mut_read_uri)
             self.failUnless(isinstance(mut_metadata, dict), mut_metadata)
-            
+
             self.failUnless(fut_node.is_unknown())
             self.failUnlessReallyEqual(fut_node.get_uri(), future_write_uri)
             self.failUnlessReallyEqual(fut_node.get_readonly_uri(), "ro." + future_read_uri)
@@ -207,7 +207,7 @@ class Dirnode(GridTestMixin, unittest.TestCase,
                 u"tiny_litdir": (nm.create_from_cap(tiny_litdir_uri), {}),
                 }
         d = c.create_immutable_dirnode(kids)
-        
+
         def _created(dn):
             self.failUnless(isinstance(dn, dirnode.DirectoryNode))
             self.failIf(dn.is_mutable())
@@ -222,7 +222,7 @@ class Dirnode(GridTestMixin, unittest.TestCase,
             self.cap = cap
             return dn.list()
         d.addCallback(_created)
-        
+
         def _check_kids(children):
             self.failUnlessReallyEqual(set(children.keys()),
                                        set([one_nfc, u"two", u"fut", u"futna", u"empty_litdir", u"tiny_litdir"]))
@@ -270,7 +270,7 @@ class Dirnode(GridTestMixin, unittest.TestCase,
             return d2
 
         d.addCallback(_check_kids)
-        
+
         d.addCallback(lambda ign: nm.create_from_cap(self.cap.to_string()))
         d.addCallback(lambda dn: dn.list())
         d.addCallback(_check_kids)
index a88808f8a66f1c150977f7e93eca545b581f63ff..beade2625c2d12ddab44e010078aeb76a24eb3a0 100644 (file)
@@ -90,7 +90,7 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin):
         previously_disappeared = self._get_count('drop_upload.files_disappeared')
 
         d = defer.Deferred()
+
         # Note: this relies on the fact that we only get one IN_CLOSE_WRITE notification per file
         # (otherwise we would get a defer.AlreadyCalledError). Should we be relying on that?
         self.uploader.set_uploaded_callback(d.callback)
index b49ca874ef98109666addf28cc30cf06208487e2..96db341026071e559dcdb65a265e004687624f86 100644 (file)
@@ -40,7 +40,7 @@ if __name__ == "__main__":
     try:
         tmpdir = tempfile.mkdtemp()
         for fname in TEST_FILENAMES:
-            open(os.path.join(tmpdir, fname), 'w').close() 
+            open(os.path.join(tmpdir, fname), 'w').close()
 
         # Use Unicode API under Windows or MacOS X
         if sys.platform in ('win32', 'darwin'):
@@ -166,7 +166,7 @@ class EncodingUtilNonUnicodePlatform(unittest.TestCase):
         self.failUnlessRaises(FilenameEncodingError,
                               listdir_unicode,
                               u'/dummy')
-        
+
         # We're trying to list a directory whose name cannot be represented in
         # the filesystem encoding.  This should fail.
         mock_getfilesystemencoding.return_value = 'ascii'
@@ -218,7 +218,7 @@ class EncodingUtil(ReallyEqualMixin):
 
         _reload()
         self.failUnlessReallyEqual(unicode_platform(), matrix[self.platform])
+
     @patch('sys.getfilesystemencoding')
     @patch('os.listdir')
     def test_listdir_unicode(self, mock_listdir, mock_getfilesystemencoding):
index 76838b041f9cf7ac4d6f1897ba5dade1b57b8097..48874a85852ff2f77e034c2f4a700e7a3952d7c3 100644 (file)
@@ -207,7 +207,7 @@ class Handler(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, unittest.TestCas
 
     def test_convert_error(self):
         self.failUnlessReallyEqual(sftpd._convert_error(None, "request"), None)
-        
+
         d = defer.succeed(None)
         d.addCallback(lambda ign:
             self.shouldFailWithSFTPError(sftp.FX_FAILURE, "_convert_error SFTPError",
@@ -997,7 +997,7 @@ class Handler(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, unittest.TestCas
         d.addCallback(lambda ign:
             self.shouldFailWithSFTPError(sftp.FX_NO_SUCH_FILE, "removefile ''",
                                          self.handler.removeFile, ""))
-            
+
         # removing a directory should fail
         d.addCallback(lambda ign:
             self.shouldFailWithSFTPError(sftp.FX_PERMISSION_DENIED, "removeFile tiny_lit_dir",
index 908c6b05232af4f0c7493d638753053cc4b25443..28c1323bc80d4aed49259253cbf6e0707e5e64f6 100644 (file)
@@ -1062,7 +1062,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
             self.failUnless(CSS_STYLE.search(res), res)
         d.addCallback(_check)
         return d
-    
+
     def test_GET_FILEURL_uri_missing(self):
         d = self.GET(self.public_url + "/foo/missing?t=uri")
         d.addBoth(self.should404, "test_GET_FILEURL_uri_missing")
@@ -1120,7 +1120,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
             self.failUnless(re.search(get_sub, res), res)
         d.addCallback(_check)
 
-        # look at a readonly directory 
+        # look at a readonly directory
         d.addCallback(lambda res:
                       self.GET(self.public_url + "/reedownlee", followRedirect=True))
         def _check2(res):
@@ -3143,10 +3143,10 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
             d = self.POST(self.public_url +
                           "/foo/?t=start-manifest&ophandle=%d" % ophandle,
                           followRedirect=True)
-            # By following the initial redirect, we collect the ophandle 
+            # By following the initial redirect, we collect the ophandle
             # we've just created.
             return d
-        # Create a collected ophandle, then collect it after 23 hours 
+        # Create a collected ophandle, then collect it after 23 hours
         # and 59 seconds to make sure that it is still there.
         d = _make_collected_ophandle(133)
         d.addCallback(lambda ign:
@@ -3651,7 +3651,7 @@ class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMi
 
         d.addCallback(lambda ign: self.GET("%s%s?t=json" % (self.rourl, str(name))))
         d.addCallback(_check_json, expect_rw_uri=False)
-        
+
         # TODO: check that getting t=info from the Info link in the ro directory
         # works, and does not include the writecap URI.
         return d
@@ -3671,12 +3671,12 @@ class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMi
         lonely_uri = "URI:LIT:n5xgk" # LIT for "one"
         mut_write_uri = "URI:SSK:vfvcbdfbszyrsaxchgevhmmlii:euw4iw7bbnkrrwpzuburbhppuxhc3gwxv26f6imekhz7zyw2ojnq"
         mut_read_uri = "URI:SSK-RO:e3mdrzfwhoq42hy5ubcz6rp3o4:ybyibhnp3vvwuq2vaw2ckjmesgkklfs6ghxleztqidihjyofgw7q"
-        
+
         # This method tests mainly dirnode, but we'd have to duplicate code in order to
         # test the dirnode and web layers separately.
-        
+
         # 'lonely' is a valid LIT child, 'ro' is a mutant child with an SSK-RO readcap,
-        # and 'write-in-ro' is a mutant child with an SSK writecap in the ro_uri field. 
+        # and 'write-in-ro' is a mutant child with an SSK writecap in the ro_uri field.
         # When the directory is read, the mutants should be silently disposed of, leaving
         # their lonely sibling.
         # We don't test the case of a retrieving a cap from the encrypted rw_uri field,
@@ -3703,7 +3703,7 @@ class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMi
                 u"write-in-ro": (mutant_write_in_ro_child, {}),
                 }
         d = c.create_immutable_dirnode(kids)
-        
+
         def _created(dn):
             self.failUnless(isinstance(dn, dirnode.DirectoryNode))
             self.failIf(dn.is_mutable())
@@ -3741,7 +3741,7 @@ class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMi
             self.failUnlessReallyEqual(numkids, 3)
             return self.rootnode.list()
         d.addCallback(_check_data)
-        
+
         # Now when we use the real directory listing code, the mutants should be absent.
         def _check_kids(children):
             self.failUnlessReallyEqual(sorted(children.keys()), [u"lonely"])
index 9dd5a5628463f15a592d6e33bce73c5251c84d6a..c8a511988c262f5b08935fa584bf953a327c361a 100644 (file)
@@ -657,7 +657,7 @@ def from_string(u, deep_immutable=False, name=u"<unknown name>"):
             error = MustBeDeepImmutableError(kind + " used in an immutable context", name)
         else:
             error = MustBeReadonlyError(kind + " used in a read-only context", name)
-            
+
     except BadURIError, e:
         error = e
 
index c4e6fae89ebac4258c7b9b657bde6a7487fd546b..216a539d772cb17958fdc3b830e48de403fc9476 100644 (file)
@@ -352,7 +352,7 @@ class DirectoryNodeHandler(RenderMixin, rend.Page, ReplaceMeMixin):
         charset = get_arg(req, "_charset", "utf-8")
         name = name.decode(charset)
         replace = boolean_of_arg(get_arg(req, "replace", "true"))
-        
+
         # We mustn't pass childcap for the readcap argument because we don't
         # know whether it is a read cap. Passing a read cap as the writecap
         # argument will work (it ends up calling NodeMaker.create_from_cap,