Replace returnValue with return (#5736)

This commit is contained in:
Amber Brown 2019-07-23 23:00:55 +10:00 committed by GitHub
parent 18a466b84e
commit 4806651744
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
177 changed files with 1359 additions and 1513 deletions

View file

@ -67,7 +67,7 @@ class EventStreamRestServlet(RestServlet):
is_guest=is_guest,
)
defer.returnValue((200, chunk))
return (200, chunk)
def on_OPTIONS(self, request):
return (200, {})
@ -91,9 +91,9 @@ class EventRestServlet(RestServlet):
time_now = self.clock.time_msec()
if event:
event = yield self._event_serializer.serialize_event(event, time_now)
defer.returnValue((200, event))
return (200, event)
else:
defer.returnValue((404, "Event not found."))
return (404, "Event not found.")
def register_servlets(hs, http_server):