From 73bb4f80aff9154d10b68a46140eb72b80023374 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 24 Apr 2007 01:41:40 -0700 Subject: [PATCH] vdrive.py: let put_file return the URI that was used for the file itself --- src/allmydata/vdrive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.45.2