Commit 93ccfaa4 authored by Javier Quinteros's avatar Javier Quinteros

Bugfix: Properly check types allowed for chstop in TDMS

parent 06c5914e
......@@ -92,9 +92,13 @@ class TDMS(object):
self.__decimate = decimate
# Selection of channels
if not isinstance(chstart, Number) or not isinstance(chstop, Number) or not isinstance(chstep, Number):
logs.error('chstart, chstop and chstep must be numbers and preferably ints')
raise TypeError('chstart, chstop and chstep must be numbers and preferably ints')
if not isinstance(chstart, Number) or not isinstance(chstep, Number):
logs.error('chstart and chstep must be numbers and preferably ints')
raise TypeError('chstart and chstep must be numbers and preferably ints')
if not isinstance(chstop, Number) and chstop is not None:
logs.error('chstop must be a number or None')
raise TypeError('chstop must be a number or None')
self.__chstart = chstart
self.__chstop = chstop
......
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