Made the location of Chrome/Chromium configurable.

master
Pacman Ghost 5 years ago
parent eadb681d84
commit dffdc88fd5
  1. 5
      vasl_templates/webapp/utils.py

@ -62,6 +62,11 @@ class HtmlScreenshots:
if "chromedriver" in webdriver_path:
options = webdriver.ChromeOptions()
options.set_headless( headless=True )
# OMG! The chromedriver looks for Chrome/Chromium in a hard-coded, fixed location (the default
# installation directory). We offer a way here to override this.
chrome_path = app.config.get( "CHROME_PATH" )
if chrome_path:
options.binary_location = chrome_path
kwargs["chrome_options"] = options
self.webdriver = webdriver.Chrome( **kwargs )
elif "geckodriver" in webdriver_path:

Loading…
Cancel
Save