Skip to content

Commit

Permalink
clean up chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyPirogov committed Jul 25, 2023
1 parent 6a735ae commit f97f901
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions webdriver_manager/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def __init__(

def install(self) -> str:
driver_path = self._get_driver_binary_path(self.driver)
if all(test_os not in driver_path for test_os in ["mac_arm64", "mac_x64"]):
os.chmod(driver_path, 0o755)
# if all(test_os not in driver_path for test_os in ["mac_arm64", "mac_x64"]):
os.chmod(driver_path, 0o755)
return driver_path

def get_os_type(self):
Expand Down
2 changes: 1 addition & 1 deletion webdriver_manager/core/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __extract_zip(self, archive_file, to_directory):
full_file_path = os.path.join(to_directory, file_path)
source = os.path.join(full_file_path, file_name)
destination = os.path.join(to_directory, file_name)
os.rename(source, destination)
os.replace(source, destination)
file_names.append(file_name)
return sorted(file_names, key=lambda x: x.lower())
return archive.namelist()
Expand Down
2 changes: 1 addition & 1 deletion webdriver_manager/drivers/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_latest_release_version(self):

latest_release_url = (
self._latest_release_url
if (self._driver_version == "latest" or determined_browser_version is None)
if (determined_browser_version is None)
else f"{self._latest_release_url}_{determined_browser_version}"
)
resp = self._http_client.get(url=latest_release_url)
Expand Down
2 changes: 1 addition & 1 deletion webdriver_manager/drivers/edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_latest_release_version(self) -> str:

edge_driver_version_to_download = (
self.get_stable_release_version()
if (self._driver_version == "latest" or determined_browser_version is None)
if (determined_browser_version is None)
else determined_browser_version
)
major_edge_version = edge_driver_version_to_download.split(".")[0]
Expand Down

0 comments on commit f97f901

Please sign in to comment.