Skip to content

Commit ea6f628

Browse files
Merge pull request #6 from SergeyPirogov/python3-support
python 3 support added
2 parents 9265715 + 1794f4c commit ea6f628

File tree

8 files changed

+8
-7
lines changed

8 files changed

+8
-7
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
'Intended Audience :: Information Technology',
2929
'Intended Audience :: Developers',
3030
'Programming Language :: Python :: 2.7',
31+
'Programming Language :: Python :: 3.5',
3132
'Topic :: Software Development :: '
3233
'Libraries :: Python Modules',
3334
'Operating System :: Microsoft :: Windows',

tests/test_chrome_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_chrome_manager_with_latest_version():
3131
def test_chrome_manager_with_wrong_version():
3232
with pytest.raises(ValueError) as ex:
3333
ChromeDriverManager("0.2").install()
34-
assert ex.value.message == "There is no such driver chromedriver with version 0.2 " \
34+
assert ex.value.args[0] == "There is no such driver chromedriver with version 0.2 " \
3535
"by http://chromedriver.storage.googleapis.com/0.2/chromedriver_{0}.zip".format(
3636
OSUtils.os_type())
3737

tests/test_firefox_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_gecko_manager_with_wrong_version():
2525
ff = webdriver.Firefox(executable_path=
2626
driver_path)
2727
ff.quit()
28-
assert ex.value.message == "There is no such driver geckodriver with version 0.2"
28+
assert ex.value.args[0] == "There is no such driver geckodriver with version 0.2"
2929

3030

3131
def test_gecko_manager_with_correct_version_and_token():

webdriver_manager/binary.py

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

44
class Binary(object):
55
def __init__(self, path):
6-
self.bin_file = file(path)
6+
self.bin_file = open(path)
77

88
@property
99
def path(self):

webdriver_manager/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def _save_file_to_cache(self, response, path):
5959
with open(path, "wb") as code:
6060
code.write(response.content)
6161
code.close()
62-
return file(path, "rb")
62+
return open(path, "rb")
6363

6464
def _get_filename_from_response(self, response, driver):
6565
try:

webdriver_manager/chrome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ def __init__(self, version="latest",
1818

1919
def install(self):
2020
bin_file = self._file_manager.download_driver(self.driver)
21-
os.chmod(bin_file.path, 0755)
21+
os.chmod(bin_file.path, 0o755)
2222
return bin_file.path

webdriver_manager/driver.py

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

33
import requests
44

5-
import config
5+
from . import config
66

77

88
class Driver(object):

webdriver_manager/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def unpack(archive):
3131
return Archive.extract_zip(archive, to_directory)
3232
else:
3333
file_list = Archive.extract_tar_file(archive, to_directory)
34-
return map(lambda x: x.name, file_list)
34+
return [x.name for x in file_list]
3535

3636

3737
class OSUtils:

0 commit comments

Comments
 (0)