diff options
Diffstat (limited to 'autoMMS.py')
-rwxr-xr-x | autoMMS.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -17,13 +17,13 @@ if __name__ == "__main__": with open(sys.argv[1],'r') as f: for line in f: if "Text00 = " in line: - info = line[9:-1] # 9 = len('Text00 = ') ,strip the final '\n' + info = line.split(' = ')[1].strip() # 9 = len('Text00 = ') ,strip the final '\n' elif line.startswith('Text'): - info += line[9:-1] + info += line.split(' = ')[1].strip() if line.startswith('DateTime'): - date = line[9:-1] - time = time.strptime(date, '%Y%m%dT%H%M%S') - if info : + date = line.split(' = ')[1].strip() + timeInfo = time.strptime(date, '%Y%m%dT%H%M%S') + if info: a = info else: print("Error : MMS invalide format, no data info found") |