diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-19 15:11:59 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-19 15:11:59 +0000 |
commit | f590f77a163e182626b79cb4f6d551409b1f9b9b (patch) | |
tree | 65fc34b3e50745d8bb964dc4512f3ddb17c0c061 /synapse/handlers/room.py | |
parent | Opentracing Utils (#5722) (diff) | |
parent | Replace returnValue with return (#5736) (diff) | |
download | synapse-f590f77a163e182626b79cb4f6d551409b1f9b9b.tar.xz |
Replace returnValue with return (#5736)
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 871c0adf18..af7cfa7888 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -130,7 +130,7 @@ class RoomCreationHandler(BaseHandler): old_room_id, new_version, # args for _upgrade_room ) - defer.returnValue(ret) + return ret @defer.inlineCallbacks def _upgrade_room(self, requester, old_room_id, new_version): @@ -195,7 +195,7 @@ class RoomCreationHandler(BaseHandler): requester, old_room_id, new_room_id, old_room_state ) - defer.returnValue(new_room_id) + return new_room_id @defer.inlineCallbacks def _update_upgraded_room_pls( @@ -690,7 +690,7 @@ class RoomCreationHandler(BaseHandler): result["room_alias"] = room_alias.to_string() yield directory_handler.send_room_alias_update_event(requester, room_id) - defer.returnValue(result) + return result @defer.inlineCallbacks def _send_events_for_new_room( @@ -823,7 +823,7 @@ class RoomCreationHandler(BaseHandler): room_creator_user_id=creator_id, is_public=is_public, ) - defer.returnValue(gen_room_id) + return gen_room_id except StoreError: attempts += 1 raise StoreError(500, "Couldn't generate a room ID.") @@ -866,7 +866,7 @@ class RoomContextHandler(object): event_id, get_prev_content=True, allow_none=True ) if not event: - defer.returnValue(None) + return None return filtered = yield (filter_evts([event])) @@ -917,7 +917,7 @@ class RoomContextHandler(object): results["end"] = token.copy_and_replace("room_key", results["end"]).to_string() - defer.returnValue(results) + return results class RoomEventSource(object): @@ -968,7 +968,7 @@ class RoomEventSource(object): else: end_key = to_key - defer.returnValue((events, end_key)) + return (events, end_key) def get_current_key(self): return self.store.get_room_events_max_id() @@ -986,4 +986,4 @@ class RoomEventSource(object): limit=config.limit, ) - defer.returnValue((events, next_key)) + return (events, next_key) |