Catch the correct errors.
diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py
index 5a6c893..b07cb56 100644
--- a/Lib/test/test_ossaudiodev.py
+++ b/Lib/test/test_ossaudiodev.py
@@ -162,7 +162,7 @@
 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