From 1b2f62d139257643b844eae6e951309d5aae472f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 26 Aug 2007 22:16:23 +0000 Subject: [PATCH] Catch IOError for when the device file doesn't exist or the user doesn't have permission to write to the device. --- Lib/test/test_ossaudiodev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py index b07cb56c4cf..83cc344fea9 100644 --- a/Lib/test/test_ossaudiodev.py +++ b/Lib/test/test_ossaudiodev.py @@ -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