From a702865cdaa16f149c73b911677bf0fbc021707d Mon Sep 17 00:00:00 2001 From: Abdelkouddous LHACHIMI Date: Wed, 22 Apr 2026 23:52:14 +0100 Subject: [PATCH] Sorting do_history output --- do_history.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/do_history.py b/do_history.py index 5c64aa2..ec09b23 100644 --- a/do_history.py +++ b/do_history.py @@ -635,9 +635,12 @@ def main(): print() print("Building history output...") - output_dict = {} - for request_id, history_data in all_results: - output_dict[request_id] = history_data # None → JSON null for failed requests + output_dict = dict( + sorted( + ((request_id, history_data) for request_id, history_data in all_results), + key=lambda x: x[0], + ) + ) # === BACKUP & WRITE === try: