"""Fastest supported single-channel command"""
try:
command = subdevice.get_cmd_generic_timed(chanlist_len=1)
- except _PyComediError, e:
+ except _PyComediError as e:
if e.function_name != 'comedi_get_cmd_generic_timed':
raise
print(' command fast 1chan: (not supported)')
def display_command(subdevice):
try:
command = subdevice.get_cmd_src_mask()
- except _PyComediError, e:
+ except _PyComediError as e:
if e.function_name != 'comedi_get_cmd_src_mask':
raise
print(' command: (not supported)')
PyComediError: myfn (some error): Success (-1)
>>> try:
... raise_error(function_name='myfn', ret=-1)
- ... except PyComediError, e:
+ ... except PyComediError as e:
... print(e.function_name)
... print(e.ret)
myfn