From: Neal Norwitz Date: Sun, 26 Aug 2007 22:16:23 +0000 (+0000) Subject: Catch IOError for when the device file doesn't exist or the user doesn't have X-Git-Tag: v2.6a1~1413 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b2f62d139257643b844eae6e951309d5aae472f;p=thirdparty%2FPython%2Fcpython.git Catch IOError for when the device file doesn't exist or the user doesn't have permission to write to the device. --- diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py index b07cb56c4cfb..83cc344fea9f 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