Kaydet (Commit) d8d179d6 authored tarafından Barry Warsaw's avatar Barry Warsaw

main(): wrap the device.setinfo() call around an exception handler.

It's possible to get a sunaudiodev.error (errno == EINVAL), although
I'm not exactly sure why, this at least won't crash the application.
üst da2d352b
......@@ -48,6 +48,7 @@ Other options are:
import sys
import os
import string
import errno
import sunaudiodev
from SUNAUDIODEV import *
......@@ -490,7 +491,12 @@ Version: %s''' % __version__
else:
usage(1, msg='Invalid option: ' + arg)
# now set the values
device.setinfo(info)
try:
device.setinfo(info)
except sunaudiodev.error, (code, msg):
if code == errno.EINVAL:
pass
raise
device.close()
......
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