fix: address codeql notes and warnings (#740)

This commit is contained in:
Jens
2025-12-20 18:17:51 +01:00
committed by GitHub
parent f0ebb26e5d
commit ba9b14b71b
9 changed files with 128 additions and 103 deletions

View File

@@ -474,6 +474,7 @@ class WebScrapingMixin:
if is_relevant_browser:
browser_processes.append(proc.info)
except (psutil.NoSuchProcess, psutil.AccessDenied):
# Process ended or is not accessible; skip it.
pass
except (psutil.Error, PermissionError) as exc:
LOG.warning("(warn) Unable to inspect browser processes: %s", exc)
@@ -518,6 +519,7 @@ class WebScrapingMixin:
self.page = None # pyright: ignore[reportAttributeAccessIssue]
def get_compatible_browser(self) -> str:
browser_paths:list[str | None] = []
match platform.system():
case "Linux":
browser_paths = [