append file: check if the new file was already added

parent 8d66b971
......@@ -140,7 +140,6 @@ class MetadataManager (tango.LatestDeviceImpl):
self.attr_lastDatafile_read = ''
self.attr_dataFolder_read = ''
self.attr_sampleParameters_read = ['']
self.attr_datafileList_read = ['']
self.attr_datasetNameList_read = ['']
#----- PROTECTED REGION ID(MetadataManager.init_device) ENABLED START -----#
# init members
......@@ -323,7 +322,7 @@ class MetadataManager (tango.LatestDeviceImpl):
def write_lastDatafile(self, attr):
data = attr.get_write_value()
if data and data != self.attr_lastDatafile_read:
if data and (not (data in self.attr_datafileList_read)):
self.attr_datafileList_read.append(data)
self.attr_lastDatafile_read = data
......
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