Skip to content

Commit

Permalink
explicitly using default args for parse_args when launched directly
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint committed Jul 30, 2024
1 parent d886aa9 commit 771512a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CommonClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ async def main(args):
parser = get_base_parser(description="Gameless Archipelago Client, for text interfacing.")
parser.add_argument('--name', default=None, help="Slot Name to connect as.")
parser.add_argument("url", nargs="?", help="Archipelago connection url")
args = parser.parse_args(args if args else None)
args = parser.parse_args(args)

if args.url:
url = urllib.parse.urlparse(args.url)
Expand All @@ -1051,4 +1051,4 @@ async def main(args):

if __name__ == '__main__':
logging.getLogger().setLevel(logging.INFO) # force log-level to work around log level resetting to WARNING
run_as_textclient()
run_as_textclient(*sys.argv[1:]) # default value for parse_args

0 comments on commit 771512a

Please sign in to comment.