From fa4fc6bd7e8a85760d8f51a818cb388dc24cc6fd Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 29 Aug 2025 09:08:05 -0400 Subject: [PATCH] Changed how the path exclusions get read back in after approval, now paths can be combined in the review process --- AirlockTools.py | 4 ++-- utils/pathfunctions.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AirlockTools.py b/AirlockTools.py index e295fe6..2a63442 100644 --- a/AirlockTools.py +++ b/AirlockTools.py @@ -372,8 +372,8 @@ def menu_prepare_to_enforce(): if os.path.exists(f"dataframe_csv\\allinfo_{first_policy}_{second_policy}.csv") and os.path.exists(f"manuallyapproved\\lcf_needs_approved_{first_policy}_{second_policy}.csv"): df1 = tryToReadCSV(f"dataframe_csv\\allinfo_{first_policy}_{second_policy}.csv") - pathexclusions,allowbyhash = utils.pathfunctions.mask_from_csv(df1, f"manuallyapproved\\lcf_needs_approved_{first_policy}_{second_policy}.csv","longestcfp") - + allowbyhash = utils.pathfunctions.mask_from_csv(df1, f"manuallyapproved\\lcf_needs_approved_{first_policy}_{second_policy}.csv","longestcfp") + pathexclusions = tryToReadCSV(f"manuallyapproved\\lcf_needs_approved_{first_policy}_{second_policy}.csv") pathexclusions.to_csv(f"preflight\\final_path_exclusions_{first_policy}_{second_policy}.csv", index=False) ct.style_dataframe_dark(pathexclusions, f"preflight\\final_path_exclusions_{first_policy}_{second_policy}.html") diff --git a/utils/pathfunctions.py b/utils/pathfunctions.py index e814fbe..a139472 100644 --- a/utils/pathfunctions.py +++ b/utils/pathfunctions.py @@ -116,7 +116,7 @@ def mask_from_csv(df, csv_path, filepath_col): # Keep only rows in df that are in approved_files masked_df = df[df[filepath_col].isin(approved_files)].copy() remainder = df[~df[filepath_col].isin(approved_files)].copy() - return masked_df, remainder + return remainder def filter_and_drop(approved, eligiblepaths, min_hashes):