summary refs log tree commit diff
path: root/contrib/cmdclient/console.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cmdclient/console.py')
-rwxr-xr-xcontrib/cmdclient/console.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py

index 77422f5e5d..ab1e1f1f4c 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py
@@ -15,8 +15,6 @@ # limitations under the License. """ Starts a synapse client console. """ -from __future__ import print_function - import argparse import cmd import getpass @@ -609,13 +607,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))