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
5 changes: 4 additions & 1 deletion py/selenium/webdriver/common/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Service(ABC):
:param port: Port for the service to run on, defaults to 0 where the operating system will decide.
:param log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.
:param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
:param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable.
"""

def __init__(
Expand Down Expand Up @@ -245,4 +246,6 @@ def _start_process(self, path: str) -> None:
raise

def env_path(self) -> Optional[str]:
return os.getenv(self.DRIVER_PATH_ENV_KEY, None)
if self.DRIVER_PATH_ENV_KEY:
return os.getenv(self.DRIVER_PATH_ENV_KEY, None)
return None
Loading