vdrive.py: let put_file return the URI that was used for the file itself

This commit is contained in:
Brian Warner 2007-04-24 01:41:40 -07:00
parent 813fdd70da
commit 73bb4f80af

View File

@ -85,7 +85,9 @@ class VDrive(service.MultiService):
def _got_dir(dirnode):
d1 = ul.upload(uploadable)
def _add(uri):
return dirnode.callRemote("add_file", name, uri)
d2 = dirnode.callRemote("add_file", name, uri)
d2.addCallback(lambda res: uri)
return d2
d1.addCallback(_add)
return d1
d.addCallback(_got_dir)