From 6f20a2561c83f37bbd1d30a1a4c0d0f685dfad24 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Thu, 10 Oct 2024 09:39:00 +0200 Subject: [PATCH] refactor --- urlchecker/core/urlproc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/urlchecker/core/urlproc.py b/urlchecker/core/urlproc.py index 6f1eec5..cc8ae7f 100644 --- a/urlchecker/core/urlproc.py +++ b/urlchecker/core/urlproc.py @@ -153,12 +153,12 @@ def get_driver(self, port: Optional[int] = None, timeout: Optional[int] = 5): try: from .webdriver import WebDriver - default_driver = WebDriver(port=port, timeout=timeout) + driver = WebDriver(port=port, timeout=timeout) # Do a sanity check of the default driver - default_driver.check("https://google.com") - driver = default_driver + driver.check("https://google.com") except: + driver = None logger.warning( "Issue with driver, results will be improved if you have it! Please match your version from https://googlechromelabs.github.io/chrome-for-testing" )