diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-30 08:01:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 08:01:33 -0400 |
commit | c978f6c4515a631f289aedb1844d8579b9334aaa (patch) | |
tree | 105d4069557d4b78c9b983ebfd8581ffad69165d /contrib | |
parent | Convert appservice to async. (#7973) (diff) | |
download | synapse-c978f6c4515a631f289aedb1844d8579b9334aaa.tar.xz |
Convert federation client to async/await. (#7975)
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/cmdclient/console.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py index 77422f5e5d..dfc1d294dc 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py @@ -609,13 +609,15 @@ class SynapseCmd(cmd.Cmd): @defer.inlineCallbacks def _do_event_stream(self, timeout): - res = yield self.http_client.get_json( - self._url() + "/events", - { - "access_token": self._tok(), - "timeout": str(timeout), - "from": self.event_stream_token, - }, + res = yield defer.ensureDeferred( + self.http_client.get_json( + self._url() + "/events", + { + "access_token": self._tok(), + "timeout": str(timeout), + "from": self.event_stream_token, + }, + ) ) print(json.dumps(res, indent=4)) |