mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
style: use 'is not None' for port check (handle port 0 explicitly)
This commit is contained in:
parent
0602564b66
commit
aa2f05f8c9
1 changed files with 1 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ def validate_url(url: str) -> Tuple[str, str]:
|
|||
is_ipv6 = addrinfo[0][0] == socket.AF_INET6
|
||||
ip_host = f"[{validated_ip}]" if is_ipv6 else validated_ip
|
||||
|
||||
if port:
|
||||
if port is not None:
|
||||
new_netloc = f"{ip_host}:{port}"
|
||||
else:
|
||||
new_netloc = ip_host
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue