Skip to content

Commit

Permalink
expose the urlparse response so clients who want different formats ca…
Browse files Browse the repository at this point in the history
…n use as well
  • Loading branch information
qwint committed Dec 7, 2024
1 parent ea8cd3f commit e9704e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CommonClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,10 +1031,14 @@ def get_base_parser(description: typing.Optional[str] = None):

def handle_url_arg(args: "argparse.Namespace",
parser: "typing.Optional[argparse.ArgumentParser]" = None) -> "argparse.Namespace":
""" handle if text client is launched using the "archipelago://name:pass@host:port" url from webhost """
"""
Parse the url arg "archipelago://name:pass@host:port" from launcher into correct launch args for CommonClient
If alternate data is required the urlparse response is saved back to args.url if valid
"""
if args.url:
url = urllib.parse.urlparse(args.url)
if url.scheme == "archipelago":
args.url = url
args.connect = url.netloc
if url.username:
args.name = urllib.parse.unquote(url.username)
Expand Down

0 comments on commit e9704e9

Please sign in to comment.