Skip to content

Commit bda568d

Browse files
committed
some py3 compatibility
1 parent a1df581 commit bda568d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

py/selenium/webdriver/remote/remote_connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,8 @@ def _request(self, url, data=None, method=None):
409409
HttpErrorHandler())
410410
resp = opener.open(request)
411411
statuscode = resp.code
412-
resp.getheader = lambda x: resp.headers.getheader(x)
412+
if not hasattr(resp, 'getheader'):
413+
resp.getheader = lambda x: resp.headers.getheader(x)
413414

414415
data = resp.read()
415416
try:

py/test/selenium/webdriver/common/executing_javascript_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
try:
2222
str = unicode
23-
except ImportError:
23+
except NameError:
2424
pass
2525

2626

0 commit comments

Comments
 (0)