summary refs log tree commit diff
path: root/contrib/cmdclient/console.py
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2024-12-20 10:57:59 +0000
committerGitHub <noreply@github.com>2024-12-20 10:57:59 +0000
commitd69c00b5a19ba45645665afa532421b25c74407a (patch)
treebda017e2da19ec213aaccd5d4fd8a95b297efaab /contrib/cmdclient/console.py
parentRemove support for PostgreSQL 11 and 12 (#18034) (diff)
downloadsynapse-d69c00b5a19ba45645665afa532421b25c74407a.tar.xz
Stop using twisted.internet.defer.returnValue (#18020)
`defer.returnValue` was only needed in Python 2; in Python 3, a simple
`return` is fine.

`twisted.internet.defer.returnValue` is deprecated as of Twisted 24.7.0.

Most uses of `returnValue` in synapse were removed a while back; this
cleans up some remaining bits.
Diffstat (limited to 'contrib/cmdclient/console.py')
-rwxr-xr-xcontrib/cmdclient/console.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py

index ca2e72b5e8..9b5d33d2b1 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py
@@ -245,7 +245,7 @@ class SynapseCmd(cmd.Cmd): if "flows" not in json_res: print("Failed to find any login flows.") - defer.returnValue(False) + return False flow = json_res["flows"][0] # assume first is the one we want. if "type" not in flow or "m.login.password" != flow["type"] or "stages" in flow: @@ -254,8 +254,8 @@ class SynapseCmd(cmd.Cmd): "Unable to login via the command line client. Please visit " "%s to login." % fallback_url ) - defer.returnValue(False) - defer.returnValue(True) + return False + return True def do_emailrequest(self, line): """Requests the association of a third party identifier