From: Collin Winter Date: Tue, 27 Mar 2007 04:55:27 +0000 (+0000) Subject: Fix two bugs related to the remove of exception subscripting. X-Git-Tag: v3.0a1~1100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e33761dcaa9f283e291127161fa9d65440d01f87;p=thirdparty%2FPython%2Fcpython.git Fix two bugs related to the remove of exception subscripting. --- diff --git a/Lib/test/test_linuxaudiodev.py b/Lib/test/test_linuxaudiodev.py index eac204f71156..340dc2d5e878 100644 --- a/Lib/test/test_linuxaudiodev.py +++ b/Lib/test/test_linuxaudiodev.py @@ -28,7 +28,7 @@ def play_sound_file(path): try: a = linuxaudiodev.open('w') except linuxaudiodev.error as msg: - if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): + if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): raise TestSkipped, msg raise TestFailed, msg diff --git a/Lib/test/test_ossaudiodev.py b/Lib/test/test_ossaudiodev.py index e97e788d7b28..6ca1f7480981 100644 --- a/Lib/test/test_ossaudiodev.py +++ b/Lib/test/test_ossaudiodev.py @@ -49,7 +49,7 @@ def play_sound_file(data, rate, ssize, nchannels): try: dsp = ossaudiodev.open('w') except IOError as msg: - if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): + if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY): raise TestSkipped, msg raise TestFailed, msg