summary refs log tree commit diff
path: root/synapse/storage/appservice.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-19 15:11:59 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-19 15:11:59 +0000
commitf590f77a163e182626b79cb4f6d551409b1f9b9b (patch)
tree65fc34b3e50745d8bb964dc4512f3ddb17c0c061 /synapse/storage/appservice.py
parentOpentracing Utils (#5722) (diff)
parentReplace returnValue with return (#5736) (diff)
downloadsynapse-f590f77a163e182626b79cb4f6d551409b1f9b9b.tar.xz
Replace returnValue with return (#5736)
Diffstat (limited to 'synapse/storage/appservice.py')
-rw-r--r--synapse/storage/appservice.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/synapse/storage/appservice.py b/synapse/storage/appservice.py

index 9d9b28de13..1e9977e1bc 100644 --- a/synapse/storage/appservice.py +++ b/synapse/storage/appservice.py
@@ -145,7 +145,7 @@ class ApplicationServiceTransactionWorkerStore( for service in as_list: if service.id == res["as_id"]: services.append(service) - defer.returnValue(services) + return services @defer.inlineCallbacks def get_appservice_state(self, service): @@ -164,9 +164,9 @@ class ApplicationServiceTransactionWorkerStore( desc="get_appservice_state", ) if result: - defer.returnValue(result.get("state")) + return result.get("state") return - defer.returnValue(None) + return None def set_appservice_state(self, service, state): """Set the application service state. @@ -298,15 +298,13 @@ class ApplicationServiceTransactionWorkerStore( ) if not entry: - defer.returnValue(None) + return None event_ids = json.loads(entry["event_ids"]) events = yield self.get_events_as_list(event_ids) - defer.returnValue( - AppServiceTransaction(service=service, id=entry["txn_id"], events=events) - ) + return AppServiceTransaction(service=service, id=entry["txn_id"], events=events) def _get_last_txn(self, txn, service_id): txn.execute( @@ -360,7 +358,7 @@ class ApplicationServiceTransactionWorkerStore( events = yield self.get_events_as_list(event_ids) - defer.returnValue((upper_bound, events)) + return (upper_bound, events) class ApplicationServiceTransactionStore(ApplicationServiceTransactionWorkerStore):