dirnode: fix my remarkably-consistent 'metdadata' typo
authorBrian Warner <warner@allmydata.com>
Fri, 3 Oct 2008 01:08:45 +0000 (18:08 -0700)
committerBrian Warner <warner@allmydata.com>
Fri, 3 Oct 2008 01:08:45 +0000 (18:08 -0700)
src/allmydata/dirnode.py
src/allmydata/test/test_dirnode.py

index c1250479d2445f165629752db545f6f4607ebb77..a69e99964d421cb3710e98dd609f8c9bb20d1914 100644 (file)
@@ -297,11 +297,11 @@ class NewDirectoryNode:
         The path can be either a single string (slash-separated) or a list of
         path-name elements.
         """
-        d = self.get_child_and_metdadata_at_path(path)
+        d = self.get_child_and_metadata_at_path(path)
         d.addCallback(lambda (node, metadata): node)
         return d
 
-    def get_child_and_metdadata_at_path(self, path):
+    def get_child_and_metadata_at_path(self, path):
         """Transform a child path into an IDirectoryNode or IFileNode and
         a metadata dictionary from the last edge that was traversed.
         """
@@ -319,7 +319,7 @@ class NewDirectoryNode:
         if remaining_path:
             d = self.get(childname)
             d.addCallback(lambda node:
-                          node.get_child_and_metdadata_at_path(remaining_path))
+                          node.get_child_and_metadata_at_path(remaining_path))
             return d
         d = self.get_child_and_metadata(childname)
         return d
index 1966722871bc462b6606ff5bb19615d7e7793c26..4858b963d1a9de98df9b81d1842c081e72e4cab0 100644 (file)
@@ -381,10 +381,10 @@ class Dirnode(unittest.TestCase, testutil.ShouldFailMixin, testutil.StallMixin):
             d.addCallback(lambda res:
                           self.shouldFail(KeyError, "gcamap-no",
                                           "'nope'",
-                                          n.get_child_and_metdadata_at_path,
+                                          n.get_child_and_metadata_at_path,
                                           u"subdir/nope"))
             d.addCallback(lambda res:
-                          n.get_child_and_metdadata_at_path(u""))
+                          n.get_child_and_metadata_at_path(u""))
             def _check_child_and_metadata1(res):
                 child, metadata = res
                 self.failUnless(isinstance(child, FakeDirectoryNode))
@@ -392,7 +392,7 @@ class Dirnode(unittest.TestCase, testutil.ShouldFailMixin, testutil.StallMixin):
                 self.failUnlessEqual(sorted(metadata.keys()), [])
             d.addCallback(_check_child_and_metadata1)
             d.addCallback(lambda res:
-                          n.get_child_and_metdadata_at_path(u"child"))
+                          n.get_child_and_metadata_at_path(u"child"))
 
             def _check_child_and_metadata2(res):
                 child, metadata = res
@@ -403,7 +403,7 @@ class Dirnode(unittest.TestCase, testutil.ShouldFailMixin, testutil.StallMixin):
             d.addCallback(_check_child_and_metadata2)
 
             d.addCallback(lambda res:
-                          n.get_child_and_metdadata_at_path(u"subdir/subsubdir"))
+                          n.get_child_and_metadata_at_path(u"subdir/subsubdir"))
             def _check_child_and_metadata3(res):
                 child, metadata = res
                 self.failUnless(isinstance(child, FakeDirectoryNode))