webapi: t=mkdir now accepts initial children, using the same JSON that t=json

emits.

client.create_dirnode(initial_children=) now works.
This commit is contained in:
Brian Warner
2009-10-12 19:34:44 -07:00
parent cf65cc2ae3
commit b30041c5ec
6 changed files with 223 additions and 13 deletions

View File

@ -459,7 +459,6 @@ class Client(node.Node, pollmixin.PollMixin):
def create_dirnode(self, initial_children={}):
d = self.nodemaker.create_new_mutable_directory()
assert not initial_children, "not ready yet: %s" % (initial_children,)
if initial_children:
d.addCallback(lambda n: n.set_children(initial_children))
return d