diff options
Diffstat (limited to 'Tools/audiopy')
-rwxr-xr-x | Tools/audiopy/audiopy | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Tools/audiopy/audiopy b/Tools/audiopy/audiopy index 19d69fd..ba03a69 100755 --- a/Tools/audiopy/audiopy +++ b/Tools/audiopy/audiopy @@ -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() |