Kaydet (Commit) c6d1f910 authored tarafından Neal Norwitz's avatar Neal Norwitz

If the audio file does not exist, the test should be skipped. Will backport.

üst f2d66fe1
...@@ -28,7 +28,7 @@ def play_sound_file(path): ...@@ -28,7 +28,7 @@ def play_sound_file(path):
try: try:
a = linuxaudiodev.open('w') a = linuxaudiodev.open('w')
except linuxaudiodev.error, msg: except linuxaudiodev.error, msg:
if msg[0] in (errno.EACCES, errno.ENODEV, errno.EBUSY): if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
raise TestSkipped, msg raise TestSkipped, msg
raise TestFailed, msg raise TestFailed, msg
......
...@@ -45,7 +45,7 @@ def play_sound_file(data, rate, ssize, nchannels): ...@@ -45,7 +45,7 @@ def play_sound_file(data, rate, ssize, nchannels):
try: try:
dsp = ossaudiodev.open('w') dsp = ossaudiodev.open('w')
except IOError, msg: except IOError, msg:
if msg[0] in (errno.EACCES, errno.ENODEV, errno.EBUSY): if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
raise TestSkipped, msg raise TestSkipped, msg
raise TestFailed, msg raise TestFailed, msg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment