diff --git a/galaxykit/gw_auth_client.py b/galaxykit/gw_auth_client.py index aae838a..6aa4daa 100644 --- a/galaxykit/gw_auth_client.py +++ b/galaxykit/gw_auth_client.py @@ -16,7 +16,10 @@ def __init__(self, auth, galaxy_root): self.headers = {} parsed_url = urlparse(self.galaxy_root) self.url = f"{parsed_url.scheme}://{parsed_url.hostname}" - if (parsed_url.scheme == "https" and parsed_url.port != 443) or (parsed_url.scheme == "http" and parsed_url.port != 80): + if parsed_url.port is not None and ( + (parsed_url.scheme == "https" and parsed_url.port != 443) + or (parsed_url.scheme == "http" and parsed_url.port != 80) + ): self.url += ":" + str(parsed_url.port) self.host = parsed_url.hostname self.login_url = f"{self.url}/api/gateway/v1/login/"