Commit 28fc855a authored by Javier Quinteros's avatar Javier Quinteros

Check better the type and values of the parameter channels

parent 203576d4
......@@ -65,7 +65,7 @@ class TDMS(object):
:param chstep: Step between channels in the selection
:type chstep: int
:param channels: Selection of channels to work with (list of integers)
:type channels: list
:type channels: list or NoneType
:param starttime: Start of the selected time window
:type starttime: datetime.datetime or NoneType
:param endtime: End of the selected time window
......@@ -99,6 +99,10 @@ class TDMS(object):
logs.error('chstop must be a number or None')
raise TypeError('chstop must be a number or None')
if not isinstance(channels, list) and channels is not None:
logs.error('channels must be a list of numbers or None')
raise TypeError('channels must be a list of numbers or None')
self.__chstart = chstart
self.__chstop = chstop
self.__chstep = chstep
......
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