summary refs log tree commit diff
path: root/contrib/cmdclient/console.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-13 16:10:20 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-13 16:10:20 +0100
commit118e789e0c097e147428ac456b60be3281c5264e (patch)
tree3464c466ce6e4e909a75b71b382561e5e1792b93 /contrib/cmdclient/console.py
parentMerge branch 'matrix-org-hotfixes' of github.com:matrix-org/synapse into matr... (diff)
parentUpdate changelog for v1.32.0 (diff)
downloadsynapse-118e789e0c097e147428ac456b60be3281c5264e.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'contrib/cmdclient/console.py')
-rwxr-xr-xcontrib/cmdclient/console.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py

index 67e032244e..856dd437db 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py
@@ -24,6 +24,7 @@ import sys import time import urllib from http import TwistedHttpClient +from typing import Optional import nacl.encoding import nacl.signing @@ -718,7 +719,7 @@ class SynapseCmd(cmd.Cmd): method, path, data=None, - query_params={"access_token": None}, + query_params: Optional[dict] = None, alt_text=None, ): """Runs an HTTP request and pretty prints the output. @@ -729,6 +730,8 @@ class SynapseCmd(cmd.Cmd): data: Raw JSON data if any query_params: dict of query parameters to add to the url """ + query_params = query_params or {"access_token": None} + url = self._url() + path if "access_token" in query_params: query_params["access_token"] = self._tok()