mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:54:47 -04:00
Replace returnValue with return (#5736)
This commit is contained in:
parent
18a466b84e
commit
4806651744
177 changed files with 1359 additions and 1513 deletions
|
@ -54,7 +54,7 @@ class ClientDirectoryServer(RestServlet):
|
|||
dir_handler = self.handlers.directory_handler
|
||||
res = yield dir_handler.get_association(room_alias)
|
||||
|
||||
defer.returnValue((200, res))
|
||||
return (200, res)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_PUT(self, request, room_alias):
|
||||
|
@ -87,7 +87,7 @@ class ClientDirectoryServer(RestServlet):
|
|||
requester, room_alias, room_id, servers
|
||||
)
|
||||
|
||||
defer.returnValue((200, {}))
|
||||
return (200, {})
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_DELETE(self, request, room_alias):
|
||||
|
@ -102,7 +102,7 @@ class ClientDirectoryServer(RestServlet):
|
|||
service.url,
|
||||
room_alias.to_string(),
|
||||
)
|
||||
defer.returnValue((200, {}))
|
||||
return (200, {})
|
||||
except InvalidClientCredentialsError:
|
||||
# fallback to default user behaviour if they aren't an AS
|
||||
pass
|
||||
|
@ -118,7 +118,7 @@ class ClientDirectoryServer(RestServlet):
|
|||
"User %s deleted alias %s", user.to_string(), room_alias.to_string()
|
||||
)
|
||||
|
||||
defer.returnValue((200, {}))
|
||||
return (200, {})
|
||||
|
||||
|
||||
class ClientDirectoryListServer(RestServlet):
|
||||
|
@ -136,9 +136,7 @@ class ClientDirectoryListServer(RestServlet):
|
|||
if room is None:
|
||||
raise NotFoundError("Unknown room")
|
||||
|
||||
defer.returnValue(
|
||||
(200, {"visibility": "public" if room["is_public"] else "private"})
|
||||
)
|
||||
return (200, {"visibility": "public" if room["is_public"] else "private"})
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_PUT(self, request, room_id):
|
||||
|
@ -151,7 +149,7 @@ class ClientDirectoryListServer(RestServlet):
|
|||
requester, room_id, visibility
|
||||
)
|
||||
|
||||
defer.returnValue((200, {}))
|
||||
return (200, {})
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_DELETE(self, request, room_id):
|
||||
|
@ -161,7 +159,7 @@ class ClientDirectoryListServer(RestServlet):
|
|||
requester, room_id, "private"
|
||||
)
|
||||
|
||||
defer.returnValue((200, {}))
|
||||
return (200, {})
|
||||
|
||||
|
||||
class ClientAppserviceDirectoryListServer(RestServlet):
|
||||
|
@ -195,4 +193,4 @@ class ClientAppserviceDirectoryListServer(RestServlet):
|
|||
requester.app_service.id, network_id, room_id, visibility
|
||||
)
|
||||
|
||||
defer.returnValue((200, {}))
|
||||
return (200, {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue