From 163d2e568e291be171096b063f50ee91ee3fb966 Mon Sep 17 00:00:00 2001 From: Lucas Faudman Date: Tue, 25 Jun 2024 18:07:21 -0700 Subject: [PATCH] set chromedriver permissions to 755 0o755 in after downloading+unzip to ensure correctly changed on linux --- pyproject.toml | 2 +- src/souperscraper/getchromedriver.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ff7821e..31efd65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "setuptools_scm>=8"] build-backend = "setuptools.build_meta" [project] -version = "1.0.1" +version = "1.0.2" authors = [{name = "Lucas Faudman", email = "lucasfaudman@gmail.com"}] dynamic = ["classifiers"] name = "souperscraper" diff --git a/src/souperscraper/getchromedriver.py b/src/souperscraper/getchromedriver.py index acb83ec..c4c0cbc 100644 --- a/src/souperscraper/getchromedriver.py +++ b/src/souperscraper/getchromedriver.py @@ -122,7 +122,7 @@ def try_make_executable(executable_path: Path): """ try: print(f"Making {executable_path} executable...") - executable_path.chmod(executable_path.stat().st_mode | X_OK) + executable_path.chmod(0o755) except Exception as e: print(f"Failed to make {executable_path} executable. Error: {e}") @@ -152,9 +152,9 @@ def get_chromedriver() -> Optional[Path]: print("Success. Chromedriver executable downloaded and saved to:\n", executable_path) if not try_make_executable(executable_path): - print("Failed to make chromedriver executable. You may need to do this manually.") - print("To make the chromedriver executable, run the following command:") - print(f"chmod +x {executable_path}") + print("\nFailed to make chromedriver executable. You may need to do this manually.") + print("\nTo make the chromedriver executable, run the following command:") + print(f"chmod +x {executable_path}\n") else: print("Chromedriver is now executable.")