Kaydet (Commit) e33761dc authored tarafından Collin Winter's avatar Collin Winter

Fix two bugs related to the remove of exception subscripting.

üst 3e81ec8c
......@@ -28,7 +28,7 @@ def play_sound_file(path):
try:
a = linuxaudiodev.open('w')
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 TestFailed, msg
......
......@@ -49,7 +49,7 @@ def play_sound_file(data, rate, ssize, nchannels):
try:
dsp = ossaudiodev.open('w')
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 TestFailed, msg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment