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
|
@ -22,7 +22,7 @@ def has_sound(sound):
|
|||
key = winreg.OpenKeyEx(winreg.HKEY_CURRENT_USER,
|
||||
"AppEvents\Schemes\Apps\.Default\{0}\.Default".format(sound))
|
||||
return winreg.EnumValue(key, 0)[1] != ""
|
||||
except WindowsError:
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
class BeepTest(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue