minor corrections to use of deferred from last commit
authorDavid Stainton <dstainton415@gmail.com>
Wed, 24 Jun 2015 19:50:36 +0000 (12:50 -0700)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 20 Jul 2015 23:42:34 +0000 (00:42 +0100)
src/allmydata/frontends/magic_folder.py

index 94b3a293899b128e951e5f68f356f1788c7d8044..4adfffae852ee137ba6df89422466e4090040b38 100644 (file)
@@ -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