Commit f17eb253 authored by Lachlan's avatar Lachlan

Slight correction to update_run_token.py

parent 0a62a92a
Pipeline #55629783 failed with stages
in 37 seconds
......@@ -92,7 +92,7 @@ def update_run_token(token_file, results_files):
print(results_files)
for file in os.listdir(results_files):
if file.endswith('.json'):
file_times[os.path.join(results_files, file)] = datetime.datetime.strptime(os.path.basename(file), 'results-%Y-%m-%d-%H:%M:%S.json'))
file_times[os.path.join(results_files, file)] = datetime.datetime.strptime(os.path.basename(file), 'results-%Y-%m-%d-%H:%M:%S.json')
if file_times:
latest_file = max(file_times.items(), key=operator.itemgetter(1))[0]
archive_result = ntpath.basename(latest_file)
......
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