mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Fix two bugs related to the remove of exception subscripting.
This commit is contained in:
parent
3e81ec8c7c
commit
e33761dcaa
2 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ def play_sound_file(path):
|
||||||
try:
|
try:
|
||||||
a = linuxaudiodev.open('w')
|
a = linuxaudiodev.open('w')
|
||||||
except linuxaudiodev.error as msg:
|
except linuxaudiodev.error as msg:
|
||||||
if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
|
if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
|
||||||
raise TestSkipped, msg
|
raise TestSkipped, msg
|
||||||
raise TestFailed, msg
|
raise TestFailed, msg
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ def play_sound_file(data, rate, ssize, nchannels):
|
||||||
try:
|
try:
|
||||||
dsp = ossaudiodev.open('w')
|
dsp = ossaudiodev.open('w')
|
||||||
except IOError as msg:
|
except IOError as msg:
|
||||||
if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
|
if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
|
||||||
raise TestSkipped, msg
|
raise TestSkipped, msg
|
||||||
raise TestFailed, msg
|
raise TestFailed, msg
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue