From: Brian Warner Date: Tue, 24 Apr 2007 08:41:40 +0000 (-0700) Subject: vdrive.py: let put_file return the URI that was used for the file itself X-Git-Url: https://git.rkrishnan.org/pf/content/en/statistics?a=commitdiff_plain;h=73bb4f80aff9154d10b68a46140eb72b80023374;p=tahoe-lafs%2Ftahoe-lafs.git vdrive.py: let put_file return the URI that was used for the file itself --- diff --git a/src/allmydata/vdrive.py b/src/allmydata/vdrive.py index fb275699..5b9146d0 100644 --- a/src/allmydata/vdrive.py +++ b/src/allmydata/vdrive.py @@ -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)