From 08c21c8d8f22c387c40c3d19f81c4cae3b6831bf Mon Sep 17 00:00:00 2001 From: Hoang Hong Quan Date: Sun, 23 Mar 2025 13:56:36 +0700 Subject: [PATCH] Fix None checks for product history index --- Scripts/gathering_files.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/gathering_files.py b/Scripts/gathering_files.py index 6df078b..3ea2e4f 100644 --- a/Scripts/gathering_files.py +++ b/Scripts/gathering_files.py @@ -197,7 +197,7 @@ class gatheringFiles: product_history_index = self.get_product_index(download_history, product_name) print("") - if product_history_index == None: + if product_history_index is None: print("Please wait for download {}...".format(product_name)) else: if product_id == download_history[product_history_index].get("id"): @@ -206,7 +206,7 @@ class gatheringFiles: else: print("Updating {}...".format(product_name)) - if product_download_url: + if product_download_url is not None: print("from " + product_download_url) else: print("Could not find download URL for {}.".format(product_name)) @@ -221,7 +221,7 @@ class gatheringFiles: self.fetcher.download_and_save_file(product_download_url, zip_path) if not os.path.exists(zip_path): - if product_history_index: + if product_history_index is not None: print("Using previously version of {}.".format(product_name)) continue else: