Catch sunaudiodev.error on open() and re-raise TestFailed exception.
This commit is contained in:
parent
59e066e73b
commit
3de721d073
|
@ -14,7 +14,11 @@ def play_sound_file(path):
|
|||
fp = open(path, 'r')
|
||||
data = fp.read()
|
||||
fp.close()
|
||||
try:
|
||||
a = sunaudiodev.open('w')
|
||||
except sunaudiodev.error, msg:
|
||||
raise TestFailed, msg
|
||||
else:
|
||||
a.write(data)
|
||||
a.close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue