Commit ff9b9633 authored by Georg Brandl's avatar Georg Brandl

Catch the correct errors.

parent 0f5e87a2
......@@ -91,7 +91,7 @@ class LinuxAudioDevTests(unittest.TestCase):
def test_main():
try:
dsp = linuxaudiodev.open('w')
except IOError, msg:
except linuxaudiodev.error, msg:
if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
raise TestSkipped(msg)
raise
......
......@@ -162,7 +162,7 @@ class OSSAudioDevTests(unittest.TestCase):
def test_main():
try:
dsp = ossaudiodev.open('w')
except IOError, msg:
except ossaudiodev.error, msg:
if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
raise TestSkipped(msg)
raise
......
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