Skip to content
Snippets Groups Projects
Unverified Commit 96251af5 authored by reivilibre's avatar reivilibre Committed by GitHub
Browse files

Fix a bug introduced in v1.67.0 where not specifying a config file or a server...

Fix a bug introduced in v1.67.0 where not specifying a config file or a server URL would lead to the `register_new_matrix_user` script failing. (#14637)
parent d69bf3b2
No related branches found
No related tags found
No related merge requests found
Fix a bug introduced in v1.67.0 where not specifying a config file or a server URL would lead to the `register_new_matrix_user` script failing.
\ No newline at end of file
...@@ -222,6 +222,7 @@ def main() -> None: ...@@ -222,6 +222,7 @@ def main() -> None:
args = parser.parse_args() args = parser.parse_args()
config: Optional[Dict[str, Any]] = None
if "config" in args and args.config: if "config" in args and args.config:
config = yaml.safe_load(args.config) config = yaml.safe_load(args.config)
...@@ -229,7 +230,7 @@ def main() -> None: ...@@ -229,7 +230,7 @@ def main() -> None:
secret = args.shared_secret secret = args.shared_secret
else: else:
# argparse should check that we have either config or shared secret # argparse should check that we have either config or shared secret
assert config assert config is not None
secret = config.get("registration_shared_secret") secret = config.get("registration_shared_secret")
secret_file = config.get("registration_shared_secret_path") secret_file = config.get("registration_shared_secret_path")
...@@ -244,7 +245,7 @@ def main() -> None: ...@@ -244,7 +245,7 @@ def main() -> None:
if args.server_url: if args.server_url:
server_url = args.server_url server_url = args.server_url
elif config: elif config is not None:
server_url = _find_client_listener(config) server_url = _find_client_listener(config)
if not server_url: if not server_url:
server_url = _DEFAULT_SERVER_URL server_url = _DEFAULT_SERVER_URL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment