py: Ensure DRIVER_PATH_ENV_KEY defaults to string#14862
py: Ensure DRIVER_PATH_ENV_KEY defaults to string#14862diemol merged 3 commits intoSeleniumHQ:trunkfrom
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 |
Delta456
left a comment
There was a problem hiding this comment.
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. |
|
I think this change cause the following issue on Linux
|
(Formatted the trace for readability) I'm not sure how this PR could cause this. Can you provide more information? |
[py] Avoid os.getenv error if driver_path_env_key is not set 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. Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
User description
Description
Follow up to PR #14528, to avoid
os.getenvraisingTypeErrorinenv_pathwhendriver_path_env_keyis not passed toServiceconstructor.This happens, for example, with the WPEWebKit driver, which currently ignores
driver_path_env_key, as the executableWPEWebDriveris 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_keyin theServiceclass docstring.DRIVER_PATH_ENV_KEYto default to an empty string if not provided, preventingTypeErrorwhenos.getenvis called.driver_path_env_key.Changes walkthrough 📝
service.py
Ensure DRIVER_PATH_ENV_KEY defaults to an empty stringpy/selenium/webdriver/common/service.py
driver_path_env_key.DRIVER_PATH_ENV_KEYto an empty string.