Commit 2d712448 authored by Matias Guijarro's avatar Matias Guijarro Committed by Vincent Michel

config/settings.py: bug fix, wrong indexing raises IndexError

parent 6d8e40f2
......@@ -367,7 +367,7 @@ class QueueSetting(object):
raise TypeError('indices must be integers')
value = self.get(first=i, last=j, cnx=cnx)
if value is None:
raise StopIteration
raise IndexError
else:
return value
......
......@@ -158,8 +158,8 @@ class LimaImageChannelDataNode(DataNode):
f = EdfFile.EdfFile(filename)
return f.GetData(image_index)
else:
raise RuntimeError("EdfFile module is not available,"
"Can't return image data")
raise RuntimeError("EdfFile module is not available, "
"cannot return image data.")
elif file_format == 'HDF5':
if h5py is not None:
with h5py.File(filename) as f:
......
......@@ -229,7 +229,7 @@ class DataNodeIterator(object):
channel_db_name = new_channel_event.group(1)
channel_node = get_node(channel_db_name)
if channel_node and \
(filter is None or channel_node.type is filter):
(filter is None or channel_node.type in filter):
yield self.NEW_DATA_IN_CHANNEL_EVENT, channel_node
class _TTL_setter(object):
......
......@@ -129,8 +129,8 @@ class LimaAcquisitionMaster(AcquisitionMaster):
def _get_lima_status(self):
attr_names = ['buffer_max_number', 'last_image_acquired',
'last_image_ready', 'last_counter_ready', 'last_image_saved']
return {name : att.value for name, att in zip(attr_names,
self.device.read_attributes(attr_names))}
return { name: att.value for name, att in zip(attr_names,
self.device.read_attributes(attr_names)) }
def reading(self):
while self.device.acq_status.lower() == 'running':
......
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