summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-05-08 16:10:51 +0100
committerErik Johnston <erik@matrix.org>2017-05-08 16:10:51 +0100
commit6a12998a83791137db0b7988646cfc4bff572427 (patch)
treed26127dd51df3e6de6eda0b14a9697b430c00d46 /synapse
parentInvalidate cache on device deletion (diff)
downloadsynapse-6a12998a83791137db0b7988646cfc4bff572427.tar.xz
Add missing yields
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/devices.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index 75c30abc28..d9936c88bb 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -106,6 +106,7 @@ class DeviceStore(SQLBaseStore):
             desc="get_device",
         )
 
+    @defer.inlineCallbacks
     def delete_device(self, user_id, device_id):
         """Delete a device.
 
@@ -115,7 +116,7 @@ class DeviceStore(SQLBaseStore):
         Returns:
             defer.Deferred
         """
-        self._simple_delete_one(
+        yield self._simple_delete_one(
             table="devices",
             keyvalues={"user_id": user_id, "device_id": device_id},
             desc="delete_device",
@@ -123,6 +124,7 @@ class DeviceStore(SQLBaseStore):
 
         self.device_id_exists_cache.invalidate((user_id, device_id))
 
+    @defer.inlineCallbacks
     def delete_devices(self, user_id, device_ids):
         """Deletes several devices.
 
@@ -132,7 +134,7 @@ class DeviceStore(SQLBaseStore):
         Returns:
             defer.Deferred
         """
-        self._simple_delete_many(
+        yield self._simple_delete_many(
             table="devices",
             column="device_id",
             iterable=device_ids,