diff --git a/archivebox/extractors/__init__.py b/archivebox/extractors/__init__.py index c0e0c433..be5832e7 100644 --- a/archivebox/extractors/__init__.py +++ b/archivebox/extractors/__init__.py @@ -182,7 +182,7 @@ def archive_links(all_links: Union[Iterable[Link], QuerySet], overwrite: bool=Fa except KeyboardInterrupt: log_archiving_paused(num_links, idx, link.timestamp) raise SystemExit(0) - except BaseException: + except BaseException: # lgtm [py/catch-base-exception] print() raise diff --git a/archivebox/main.py b/archivebox/main.py index 07b0dc6e..a3bcde93 100755 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -933,7 +933,7 @@ def setup(out_dir: Path=OUTPUT_DIR) -> None: os.chmod(NEW_YOUTUBEDL_BINARY, 0o777) assert NEW_YOUTUBEDL_BINARY.exists(), f'youtube_dl must exist inside {pkg_path}' config(f'YOUTUBEDL_BINARY={NEW_YOUTUBEDL_BINARY}', set=True, out_dir=out_dir) - except BaseException as e: + except BaseException as e: # lgtm [py/catch-base-exception] stderr(f'[X] Failed to install python packages: {e}', color='red') raise SystemExit(1) @@ -955,7 +955,7 @@ def setup(out_dir: Path=OUTPUT_DIR) -> None: NEW_CHROME_BINARY = proc.stdout.decode().strip() if isinstance(proc.stdout, bytes) else proc.stdout.strip() assert NEW_CHROME_BINARY and len(NEW_CHROME_BINARY), 'CHROME_BINARY must contain a path' config(f'CHROME_BINARY={NEW_CHROME_BINARY}', set=True, out_dir=out_dir) - except BaseException as e: + except BaseException as e: # lgtm [py/catch-base-exception] stderr(f'[X] Failed to install chromium using playwright: {e.__class__.__name__} {e}', color='red') raise SystemExit(1) @@ -996,7 +996,7 @@ def setup(out_dir: Path=OUTPUT_DIR) -> None: '--loglevel', 'error', ], capture_output=False, cwd=out_dir) os.remove(out_dir / 'package.json') - except BaseException as e: + except BaseException as e: # lgtm [py/catch-base-exception] stderr(f'[X] Failed to install npm packages: {e}', color='red') hint(f'Try deleting {out_dir}/node_modules and running it again') raise SystemExit(1)