From 36d39139a205468a209fa8c47e7552b0fe0929a0 Mon Sep 17 00:00:00 2001 From: qwint Date: Mon, 18 Mar 2024 11:08:55 -0500 Subject: [PATCH] moved the port setting down to just reuse the later 'try' block because i wanted to be raising the error there anyways --- CommonClient.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CommonClient.py b/CommonClient.py index 56d948acb8a3..d10e795a3a6e 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -643,16 +643,13 @@ async def server_loop(ctx: CommonContext, address: typing.Optional[str] = None) ctx.username = server_url.username if server_url.password: ctx.password = server_url.password - try: - port = server_url.port or 38281 - except ValueError as e: - logger.info("Given Port could not be converted into an Integer") def reconnect_hint() -> str: return ", type /connect to reconnect" if ctx.server_address else "" logger.info(f'Connecting to Archipelago server at {address}') try: + port = server_url.port or 38281 socket = await websockets.connect(address, port=port, ping_timeout=None, ping_interval=None, ssl=get_ssl_context() if address.startswith("wss://") else None) if ctx.ui is not None: