Skip to content

Commit 6d347d7

Browse files
committed
delegate HTTP 401 and 403 to Python requests (#1033)
1 parent dba3d42 commit 6d347d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

owslib/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ def openURL(url_base, data=None, method='Get', cookies=None, username=None, pass
208208

209209
req = requests.request(method.upper(), url_base, headers=headers, **rkwargs)
210210

211-
if req.status_code in [400, 401, 403]:
211+
if req.status_code == 400:
212212
raise ServiceException(req.text)
213213

214-
if req.status_code in [404, 500, 502, 503, 504]: # add more if needed
214+
if req.status_code in [401, 403, 404, 500, 502, 503, 504]: # add more if needed
215215
req.raise_for_status()
216216

217217
# check for service exceptions without the http header set

0 commit comments

Comments
 (0)