Skip to content

Commit 9d7fb14

Browse files
committed
ok, now py3 support ;)
1 parent bda568d commit 9d7fb14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

py/selenium/webdriver/remote/remote_connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,10 @@ def _request(self, url, data=None, method=None):
410410
resp = opener.open(request)
411411
statuscode = resp.code
412412
if not hasattr(resp, 'getheader'):
413-
resp.getheader = lambda x: resp.headers.getheader(x)
413+
if hasattr(resp.headers, 'getheader'):
414+
resp.getheader = lambda x: resp.headers.getheader(x)
415+
elif hasattr(resp.headers, 'get'):
416+
resp.getheader = lambda x: resp.headers.get(x)
414417

415418
data = resp.read()
416419
try:

0 commit comments

Comments
 (0)