diff --git a/src/agora/io/metadata.py b/src/agora/io/metadata.py index 0d93116f8112563d9f8c6d20cb47f42fa86aa61a..949a5ce6f3640bef3492efa5e54424d15438e4bb 100644 --- a/src/agora/io/metadata.py +++ b/src/agora/io/metadata.py @@ -85,7 +85,7 @@ def find_file(root_dir, regex): print( "Warning:Metadata: More than one logfile found. Defaulting to first option." ) - file = [file[0]] + file = [sorted(file)[0]] if len(file) == 0: print("Warning:Metadata: No valid logfile found.") else: