Catch the correct errors.
This commit is contained in:
parent
0f5e87a266
commit
ff9b963387
|
@ -91,7 +91,7 @@ class LinuxAudioDevTests(unittest.TestCase):
|
||||||
def test_main():
|
def test_main():
|
||||||
try:
|
try:
|
||||||
dsp = linuxaudiodev.open('w')
|
dsp = linuxaudiodev.open('w')
|
||||||
except IOError, msg:
|
except linuxaudiodev.error, msg:
|
||||||
if msg.args[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
|
raise
|
||||||
|
|
|
@ -162,7 +162,7 @@ class OSSAudioDevTests(unittest.TestCase):
|
||||||
def test_main():
|
def test_main():
|
||||||
try:
|
try:
|
||||||
dsp = ossaudiodev.open('w')
|
dsp = ossaudiodev.open('w')
|
||||||
except IOError, msg:
|
except ossaudiodev.error, msg:
|
||||||
if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
|
if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
|
||||||
raise TestSkipped(msg)
|
raise TestSkipped(msg)
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in New Issue