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
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."""
(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",