Skip to content

Commit 10bb227

Browse files
authored
Merge branch 'trunk' into safari_logging
2 parents e322be3 + edff2f3 commit 10bb227

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

java/spotbugs-excludes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,4 +224,10 @@
224224
<Class name="org.openqa.selenium.edge.AddHasCasting" />
225225
<Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
226226
</Match>
227+
228+
<Match>
229+
<Class name="~org.openqa.selenium.devtools.v[0-9]+\.v\w+" />
230+
<Bug pattern="NM_CLASS_NAMING_CONVENTION"/>
231+
</Match>
232+
227233
</FindBugsFilter>

py/selenium/webdriver/remote/remote_connection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ def _request(self, method, url, body=None):
336336
if 300 <= statuscode < 304:
337337
return self._request("GET", response.headers.get("location", None))
338338
if 399 < statuscode <= 500:
339-
return {"status": statuscode, "value": data}
339+
if statuscode == 401:
340+
return {"status": statuscode, "value": "Authorization Required"}
341+
return {"status": statuscode, "value": str(statuscode) if not data else data.strip()}
340342
content_type = []
341343
if response.headers.get("Content-Type", None):
342344
content_type = response.headers.get("Content-Type", None).split(";")

0 commit comments

Comments
 (0)