diff options
-rw-r--r-- | Lib/test/test_linuxaudiodev.py | 2 | ||||
-rw-r--r-- | Lib/test/test_ossaudiodev.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_linuxaudiodev.py b/Lib/test/test_linuxaudiodev.py index eac204f..340dc2d 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 e97e788..6ca1f74 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 |