From b3a67b1b93f9f5c5dfb521162f96a2f22b919d2e Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 1 Sep 2025 22:10:00 -0400 Subject: [PATCH] file check added --- AirlockTools.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/AirlockTools.py b/AirlockTools.py index b2d0248..d920fda 100644 --- a/AirlockTools.py +++ b/AirlockTools.py @@ -303,7 +303,15 @@ def menu_prepare_to_enforce(): del data del exe1 del executionhist_policy1 - os.remove("chunkinator.json") + + + if os.path.exists("chunkinator.json"): + os.remove("chunkinator.json") + print(f"File 'chunkinator.json' has been deleted.") + else: + print(f"File 'chunkinator.json' does not exist.") + + gc.collect() if not os.path.exists(f"parquet\\execution_history_{second_policy}.parquet"): @@ -322,7 +330,13 @@ def menu_prepare_to_enforce(): del executionhist_policy2 del data2 del exe2 - os.remove("chunkinator.json") + + if os.path.exists("chunkinator.json"): + os.remove("chunkinator.json") + print(f"File 'chunkinator.json' has been deleted.") + else: + print(f"File 'chunkinator.json' does not exist.") + gc.collect() if not os.path.exists(f"parquet\\combined_hashlist_{first_policy}_{second_policy}.parquet"):