summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-08-24 19:22:34 (GMT)
committerGeorg Brandl <georg@python.org>2007-08-24 19:22:34 (GMT)
commitff9b96338700ff0952e960d3e6e1d3258582579b (patch)
treebdbc65fa7c71d5bd52eef9bda6b0a09383a5e2e0
parent0f5e87a2661c57f16ca3ff951c239da32e73fc27 (diff)
downloadcpython-ff9b96338700ff0952e960d3e6e1d3258582579b.zip
cpython-ff9b96338700ff0952e960d3e6e1d3258582579b.tar.gz
cpython-ff9b96338700ff0952e960d3e6e1d3258582579b.tar.bz2
Catch the correct errors.
-rw-r--r--Lib/test/test_linuxaudiodev.py2
-rw-r--r--Lib/test/test_ossaudiodev.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_linuxaudiodev.py b/Lib/test/test_linuxaudiodev.py
index d884cf8..5d1d1ce 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 5a6c893..b07cb56 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