-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
py: Ensure DRIVER_PATH_ENV_KEY defaults to string #14862
base: trunk
Are you sure you want to change the base?
py: Ensure DRIVER_PATH_ENV_KEY defaults to string #14862
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Maybe, based on this feedback, it'd be better to replace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should default to an empty string imo so this can be merged!
Follow up to PR SeleniumHQ#14528, to avoid `os.getenv` raising `TypeError` in `env_path` when `driver_path_env_key` is not passed to `Service` constructor.
84f41bd
to
a3812fa
Compare
Updated the patch to keep the recommendation of using "None" to indicate the absence of value. |
User description
Description
Follow up to PR #14528, to avoid
os.getenv
raisingTypeError
inenv_path
whendriver_path_env_key
is not passed toService
constructor.This happens, for example, with the WPEWebKit driver, which currently ignores
driver_path_env_key
, as the executableWPEWebDriver
is usually available on$PATH
(which is set either natively or through other test scripts).Types of changes
Checklist
PR Type
Bug fix
Description
driver_path_env_key
in theService
class docstring.DRIVER_PATH_ENV_KEY
to default to an empty string if not provided, preventingTypeError
whenos.getenv
is called.driver_path_env_key
.Changes walkthrough 📝
service.py
Ensure DRIVER_PATH_ENV_KEY defaults to an empty string
py/selenium/webdriver/common/service.py
driver_path_env_key
.DRIVER_PATH_ENV_KEY
to an empty string.