Skip to content

Commit

Permalink
use os.link instead of pathlib.hardlink_to
Browse files Browse the repository at this point in the history
  • Loading branch information
r2dev2 committed Jul 28, 2023
1 parent 07097e1 commit 1270ebe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion autoparaselenium/browsers/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def setup_driver(pwd: Path) -> None:
chrome_version = __get_chrome_version()
driver_version = __get_chromedriver_version(pwd)
if driver_version is None or driver_version < chrome_version:
print(driver_version, chrome_version)
# chromedriver changed its LATEST_RELEASE_{version} api and download link
# for chrome >= 115
if chrome_version < 115:
Expand Down
6 changes: 4 additions & 2 deletions autoparaselenium/setup_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
import tarfile
from pathlib import Path
Expand Down Expand Up @@ -39,8 +40,9 @@ def setup_driver(platform_install, platform_drivers, pwd: Path) -> None:

# sometimes webdriver is nested in a folder after zip extraction
if not Path(pwd / platform_drivers[platform]).exists():
(pwd / platform_drivers[platform]).hardlink_to(
next(pwd.rglob(platform_drivers[platform]))
os.link(
next(pwd.rglob(platform_drivers[platform])),
pwd / platform_drivers[platform]
)


Expand Down

0 comments on commit 1270ebe

Please sign in to comment.