Skip to content

Commit f90dc50

Browse files
aschollmeier-gcmlpmvantellingen
authored andcommitted
Avoid potential AttributeError in httpx version check
1 parent dc0b318 commit f90dc50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/zeep/transports.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
try:
2020
from packaging.version import Version
21-
if Version(httpx.__version__) >= Version("0.26.0"):
22-
HTTPX_PROXY_KWARG_NAME = "proxy"
23-
else:
21+
if httpx is None or Version(httpx.__version__) < Version("0.26.0"):
2422
HTTPX_PROXY_KWARG_NAME = "proxies"
23+
else:
24+
HTTPX_PROXY_KWARG_NAME = "proxy"
2525
except ImportError:
2626
Version = None
2727
HTTPX_PROXY_KWARG_NAME = None

0 commit comments

Comments
 (0)