From 1270ebea3d71c1c29e10d1a677a0b5d0661d0d38 Mon Sep 17 00:00:00 2001 From: r2dev2 Date: Thu, 27 Jul 2023 21:51:57 -0700 Subject: [PATCH] use os.link instead of pathlib.hardlink_to --- autoparaselenium/browsers/chrome.py | 1 - autoparaselenium/setup_utils.py | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/autoparaselenium/browsers/chrome.py b/autoparaselenium/browsers/chrome.py index 6a05b02..15c9414 100644 --- a/autoparaselenium/browsers/chrome.py +++ b/autoparaselenium/browsers/chrome.py @@ -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: diff --git a/autoparaselenium/setup_utils.py b/autoparaselenium/setup_utils.py index 1f75079..7ed18f3 100644 --- a/autoparaselenium/setup_utils.py +++ b/autoparaselenium/setup_utils.py @@ -1,3 +1,4 @@ +import os import sys import tarfile from pathlib import Path @@ -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] )