From: Georg Brandl Date: Fri, 24 Aug 2007 19:22:34 +0000 (+0000) Subject: Catch the correct errors. X-Git-Tag: v2.6a1~1431 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff9b96338700ff0952e960d3e6e1d3258582579b;p=thirdparty%2FPython%2Fcpython.git Catch the correct errors. --- diff --git a/Lib/test/test_linuxaudiodev.py b/Lib/test/test_linuxaudiodev.py index d884cf8802eb..5d1d1ce13759 100644 --- a/Lib/test/test_linuxaudiodev.py +++ b/Lib/test/test_linuxaudiodev.py @@ -91,7 +91,7 @@ class LinuxAudioDevTests(unittest.TestCase): def test_main(): try: dsp = linuxaudiodev.open('w') - except IOError, msg: + except linuxaudiodev.error, msg: if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): raise TestSkipped(msg) raise diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py index 5a6c8931839b..b07cb56c4cfb 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 IOError, msg: + except ossaudiodev.error, msg: if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): raise TestSkipped(msg) raise