mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-13 22:03:04 +00:00
dirnode.set_nodes: change return value: fire with self instead of None
This commit is contained in:
parent
304aadd4f7
commit
f871c3bb3d
@ -443,7 +443,7 @@ class DirectoryNode:
|
||||
return defer.fail(NotMutableError())
|
||||
a = Adder(self, entries, overwrite=overwrite)
|
||||
d = self._node.modify(a.modify)
|
||||
d.addCallback(lambda res: None)
|
||||
d.addCallback(lambda res: self)
|
||||
return d
|
||||
|
||||
|
||||
|
@ -926,8 +926,8 @@ class IDirectoryNode(IMutableFilesystemNode):
|
||||
def set_nodes(entries, overwrite=True):
|
||||
"""Add multiple (name, child_node) pairs (or (name, child_node,
|
||||
metadata) triples) to a directory node. Returns a Deferred that fires
|
||||
(with None) when the operation finishes. This is equivalent to
|
||||
calling set_node() multiple times, but is much more efficient. All
|
||||
(with this dirnode) when the operation finishes. This is equivalent
|
||||
to calling set_node() multiple times, but is much more efficient. All
|
||||
child names must be unicode strings."""
|
||||
|
||||
|
||||
|
@ -490,6 +490,7 @@ class Dirnode(GridTestMixin, unittest.TestCase,
|
||||
(u"f3", n,
|
||||
{"key": "value"}),
|
||||
]))
|
||||
d.addCallback(lambda n2: self.failUnlessIdentical(n2, n))
|
||||
d.addCallback(lambda res:
|
||||
self.shouldFail(ExistingChildError, "set_nodes-no",
|
||||
"child 'f1' already exists",
|
||||
|
Loading…
x
Reference in New Issue
Block a user