Commit c8fcb390 authored by marc's avatar marc
Browse files

Return a list, because dict is randomly ordered for Python 3.4

parent caf8e203
......@@ -46,7 +46,6 @@ class MetaData():
'''
self.mode = 'Pulsar'
self.LSREnabled = 'False'
self.metaDict = {}
def __str__(self):
return
......@@ -68,10 +67,10 @@ class MetaData():
('backEndMode' , self.mode),
('LSREnabled' , self.LSREnabled)
]
self.metaDict = {key: value for key, value in metaData}
logging.info('Return Meta data from MetaData class')
return self.metaDict
return metaData
if __name__ == '__main__':
myData = MetaData()
myData.operator1 = 'Ops01'
......@@ -82,7 +81,10 @@ if __name__ == '__main__':
logging.info(myData.operator3)
logging.info(myData.startTime)
logging.info(myData.tool)
myMetaData = myData.getMetaData()
for data in myMetaData:
logging.info('#{:20}: {:40}'.format(data[0],str(data[1])))
'''
for k, v in myData.getMetaData().items():
logging.info('#key: {}\t value: {}'.format(k,v))
\ No newline at end of file
'''
\ No newline at end of file
Supports Markdown
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