Skip to content

Commit d59dc97

Browse files
committed
IDEV-2028: Don't convert proxy_url as proxy_mounts as we are only using the simplified proxy parameter in httpx.Client.
1 parent 2a3df7f commit d59dc97

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

domaintools/api.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,8 @@ def __init__(
8989

9090
if not https:
9191
raise Exception("The DomainTools API endpoints no longer support http traffic. Please make sure https=True.")
92-
if proxy_url:
93-
if isinstance(proxy_url, str):
94-
self.proxy_url = {"http://": proxy_url, "https://": proxy_url}
95-
else:
96-
raise Exception("Proxy URL must be a string. For example: '127.0.0.1:8888'")
92+
if proxy_url and not isinstance(proxy_url, str):
93+
raise Exception("Proxy URL must be a string. For example: '127.0.0.1:8888'")
9794

9895
def _build_api_url(self, api_url=None, api_port=None):
9996
"""Build the API url based on the given url and port. Defaults to `https://api.domaintools.com`"""

0 commit comments

Comments
 (0)