Skip to content

Commit

Permalink
allow none address in build_for_address
Browse files Browse the repository at this point in the history
  • Loading branch information
thesujai committed Apr 23, 2024
1 parent edd9f1a commit 06fd5d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kolibri/core/discovery/utils/network/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def build_for_address(cls, address, timeout=None):
:return: A NetworkClient with a verified connection
:rtype: NetworkClient|cls
"""

# we cannot pass None address to get_normalized_url_variations()
# as it uses parse_address_into_components() which takes no None
if address is None:
return cls(address)
logger.info(
"Attempting connections to variations of the URL: {}".format(address)
)
Expand Down

0 comments on commit 06fd5d7

Please sign in to comment.