mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #16719: Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
This commit is contained in:
parent
8a045cb93b
commit
2606a6f197
28 changed files with 79 additions and 87 deletions
|
@ -30,7 +30,7 @@ def modify():
|
|||
with winreg.CreateKey(HKCU, ENV) as key:
|
||||
try:
|
||||
envpath = winreg.QueryValueEx(key, PATH)[0]
|
||||
except WindowsError:
|
||||
except OSError:
|
||||
envpath = DEFAULT
|
||||
|
||||
paths = [envpath]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue