[Python-checkins] r57408 - python/trunk/Lib/test/test_linuxaudiodev.py python/trunk/Lib/test/test_ossaudiodev.py

Neal Norwitz nnorwitz at gmail.com
Sat Aug 25 19:36:33 CEST 2007


Georg,

What was the reason for this change?  It broke the buildbots that
don't have an audio device.  Looking in the code for newossobject
(ossaudiodev.c) it looks like the only error that can be raised is an
IOError.

Here's an example:
http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/2386/step-test/0

Thanks,
n
--

On 8/24/07, georg.brandl <python-checkins at python.org> wrote:
> Author: georg.brandl
> Date: Fri Aug 24 21:22:34 2007
> New Revision: 57408
>
> Modified:
>    python/trunk/Lib/test/test_linuxaudiodev.py
>    python/trunk/Lib/test/test_ossaudiodev.py
> Log:
> Catch the correct errors.
>
>
> Modified: python/trunk/Lib/test/test_linuxaudiodev.py
> ==============================================================================
> --- python/trunk/Lib/test/test_linuxaudiodev.py (original)
> +++ python/trunk/Lib/test/test_linuxaudiodev.py Fri Aug 24 21:22:34 2007
> @@ -91,7 +91,7 @@
>  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
>
> Modified: python/trunk/Lib/test/test_ossaudiodev.py
> ==============================================================================
> --- python/trunk/Lib/test/test_ossaudiodev.py   (original)
> +++ python/trunk/Lib/test/test_ossaudiodev.py   Fri Aug 24 21:22:34 2007
> @@ -162,7 +162,7 @@
>  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
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>


More information about the Python-checkins mailing list