| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
* Discard the DEFAULT "%PATH%" value. * Delete wrong `os.path.isdir()`. * Add absolute path instead of `%APPDATA%...` if the type of PATH is `REG_SZ`. * Broadcast a `WM_SETTINGCHANG` message after the change of env vars. * Add codes to deal with possible errors.
|
@neEverett, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @tiran and @birkenfeld to be potential reviewers. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for this! Overall they are good looking changes, just a few loose ends to tidy up.
Sorry, something went wrong.
| import site | ||
| import os | ||
| import winreg | ||
| import ctypes |
There was a problem hiding this comment.
Put in alphabetical order
Sorry, something went wrong.
| envpath, dtype = winreg.QueryValueEx(key, PATH) | ||
| except FileNotFoundError: | ||
| envpath, dtype = "", winreg.REG_EXPAND_SZ | ||
| pass |
There was a problem hiding this comment.
Unnecessary pass
Sorry, something went wrong.
| except: | ||
| raise OSError("Failed to load PATH value") | ||
|
|
||
| if hasattr(site, "USER_SITE") and dtype == winreg.REG_EXPAND_SZ: |
There was a problem hiding this comment.
This hasattr check doesn't apply to the subsequent elif block, or rather, if the first check here fails then we may end up crashing in the elif block.
Sorry, something went wrong.
Fixed the problems mentioned here: python#1645
Fixed the problems mentioned here: python#1645
|
Closing and reopening to retrigger tests. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
Closing as win_add2path.py was removed in #98167. thanks |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
https://bugs.python.org/issue30374