chore: raise exception when chrome cannot be found

This commit is contained in:
Joël Luijmes 2023-05-02 15:16:54 +02:00
parent bf7dcf8b57
commit c74631257b
No known key found for this signature in database
GPG Key ID: 20203DEB27A6A0D8
1 changed files with 2 additions and 0 deletions

View File

@ -842,3 +842,5 @@ def find_chrome_executable():
for candidate in candidates: for candidate in candidates:
if os.path.exists(candidate) and os.access(candidate, os.X_OK): if os.path.exists(candidate) and os.access(candidate, os.X_OK):
return os.path.normpath(candidate) return os.path.normpath(candidate)
raise RuntimeError("Could not automatically find the chrome executable. Please install chrome or chromium first, or specify browser_executable_path the options.")