From: David Stainton Date: Wed, 24 Jun 2015 19:50:36 +0000 (-0700) Subject: minor corrections to use of deferred from last commit X-Git-Url: https://git.rkrishnan.org/pf/content/en.html?a=commitdiff_plain;h=4bb24169ad6a3512eacfa0965fc6ab84f7fcc00c;p=tahoe-lafs%2Ftahoe-lafs.git minor corrections to use of deferred from last commit --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 94b3a293..4adfffae 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -222,13 +222,13 @@ class MagicFolder(service.MultiService): pass else: def get_metadata(d): - self._parent.get_metadata_for(name) + return self._parent.get_metadata_for(name) d2.addCallback(get_metadata) def set_deleted(metadata): metadata['version'] += 1 metadata['deleted'] = True emptyUploadable = Data("", self._convergence) - self._parent.add_file(name, emptyUploadable, overwrite=True, metadata=metadata) + return self._parent.add_file(name, emptyUploadable, overwrite=True, metadata=metadata) d2.addCallback(set_deleted) d2.addCallback(lambda x: Exception("file does not exist")) return d2