mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Backport: If the audio file does not exist, the test should be skipped.
This commit is contained in:
@@ -28,7 +28,7 @@ def play_sound_file(path):
|
||||
try:
|
||||
a = linuxaudiodev.open('w')
|
||||
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 TestFailed, msg
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ def play_sound_file(data, rate, ssize, nchannels):
|
||||
try:
|
||||
dsp = ossaudiodev.open('w')
|
||||
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 TestFailed, msg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user