Skip to content

Commit

Permalink
Make proxy check explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
karpetrosyan committed Oct 10, 2023
1 parent dd5a915 commit d71deba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httpx/_transports/default.py
Expand Up @@ -132,7 +132,7 @@ def __init__(
) -> None:
ssl_context = create_ssl_context(verify=verify, cert=cert, trust_env=trust_env)

if proxy and isinstance(proxy, str):
if proxy is not None and isinstance(proxy, str):
proxy = Proxy(url=proxy)

if proxy is None:
Expand Down Expand Up @@ -274,7 +274,7 @@ def __init__(
) -> None:
ssl_context = create_ssl_context(verify=verify, cert=cert, trust_env=trust_env)

if proxy and isinstance(proxy, str):
if proxy is not None and isinstance(proxy, str):
proxy = Proxy(url=proxy)

if proxy is None:
Expand Down

0 comments on commit d71deba

Please sign in to comment.