Skip to content

Commit

Permalink
clean up chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyPirogov committed Jul 25, 2023
1 parent e512ba8 commit 6a735ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions webdriver_manager/core/driver_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def find_driver(self, driver: Driver):
driver_name = driver.get_name()
browser_type = driver.get_browser_type()
browser_version = self._os_system_manager.get_browser_version_from_os(browser_type)
if not browser_version:
return None

driver_version = self.get_cache_key_driver_version(driver)
metadata = self.load_metadata_content()

Expand Down
3 changes: 2 additions & 1 deletion webdriver_manager/core/os_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,5 @@ def get_browser_version_from_os(self, browser_type=None):
version = read_version_from_cmd(cmd_mapping, pattern)
return version
except Exception:
raise Exception("Can not get browser version from OS")
return None
# raise Exception("Can not get browser version from OS")

0 comments on commit 6a735ae

Please sign in to comment.