projects
/
pycomedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e52484
)
Fix error condition `ret < 0` -> `ret < len(insnlist)` for Device.do_insnlist.
author
W. Trevor King
<wking@drexel.edu>
Mon, 19 Mar 2012 16:10:18 +0000
(12:10 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Mon, 19 Mar 2012 16:10:18 +0000
(12:10 -0400)
The previous implemenation would apparently succeed if there was an
error executing an instruction. It would only raise an exception if a
failure occured before the first instruction could be executed.
pycomedi/device.pyx
patch
|
blob
|
history
diff --git
a/pycomedi/device.pyx
b/pycomedi/device.pyx
index b5ef68391cdcacb48793b3d25f5da29069046f16..bdff315459fcb8589f9aff80d50479132ad11682 100644
(file)
--- a/
pycomedi/device.pyx
+++ b/
pycomedi/device.pyx
@@
-243,7
+243,7
@@
cdef class Device (object):
ret = _comedilib_h.comedi_do_insnlist(self.device, &il)
finally:
_stdlib.free(il.insns)
- if ret <
0
:
+ if ret <
len(insnlist)
:
_error.raise_error(function_name='comedi_do_insnlist', ret=ret)
return ret