From af2eeec28437bb03e396592c70efd79976a8494e Mon Sep 17 00:00:00 2001 From: Hoang Hong Quan Date: Sat, 27 Jul 2024 18:51:07 +0700 Subject: [PATCH] Cannot allow reloading of files that have already been completed --- Scripts/gathering_files.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Scripts/gathering_files.py b/Scripts/gathering_files.py index a65934d..7b6008c 100755 --- a/Scripts/gathering_files.py +++ b/Scripts/gathering_files.py @@ -262,7 +262,7 @@ class gatheringFiles: "last_updated": "2024-07-25T12:00:00" } - last_updated = datetime.fromisoformat(download_history["last_updated"]) + last_updated = datetime.fromisoformat(download_history["last_updated"] or "2024-07-25T12:00:00") current_time = datetime.now() if current_time - last_updated < timedelta(minutes=10): @@ -291,6 +291,8 @@ class gatheringFiles: }) else: download_history["versions"][product_index]["id"] = product_data.get("id") + + self.utils.write_file(self.download_history_file, download_history) current_time = datetime.now().isoformat() download_history["last_updated"] = current_time