Skip to content

Commit b4dd762

Browse files
committed
[py]: Improve exception chaining from DriverFinder.get_path(...)
1 parent 642c4fd commit b4dd762

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py/selenium/webdriver/common/driver_finder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def get_path(service: Service, options: BaseOptions) -> str:
3737
try:
3838
path = SeleniumManager().driver_location(options) if path is None else path
3939
except Exception as err:
40-
msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager; {err}"
41-
raise NoSuchDriverException(msg)
40+
msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
41+
raise NoSuchDriverException(msg) from err
4242

4343
if path is None or not Path(path).is_file():
4444
raise NoSuchDriverException(f"Unable to locate or obtain driver for {options.capabilities['browserName']}")

0 commit comments

Comments
 (0)