Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions html2print/html2print.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
class ChromeDriverManager:
def get_chrome_driver(self, path_to_cache_dir: str):
chrome_version = self.get_chrome_version()

# If Web Driver Manager cannot detect Chrome, it returns None.
if chrome_version is None:
raise RuntimeError(
"html2print: "
"Web Driver Manager could not detect an existing Chrome installation."
)

chrome_major_version = chrome_version.split(".")[0]

print( # noqa: T201
Expand Down