Catch IOError for when the device file doesn't exist or the user doesn't have

permission to write to the device.
This commit is contained in:
Neal Norwitz 2007-08-26 22:16:23 +00:00
parent 15d4e56c40
commit 1b2f62d139
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ class OSSAudioDevTests(unittest.TestCase):
def test_main():
try:
dsp = ossaudiodev.open('w')
except ossaudiodev.error, msg:
except (ossaudiodev.error, IOError), msg:
if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
raise TestSkipped(msg)
raise