Skip to content
Snippets Groups Projects
Commit 8b3c6f7f authored by Roberto Arturo Homs-Regojo's avatar Roberto Arturo Homs-Regojo
Browse files

append file: check if the new file was already added

parent 8d66b971
No related branches found
No related tags found
1 merge request!29WIP: Resolve "append file allows to add a duplicated one if it is not the previous one"
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment