Changed how the path exclusions get read back in after approval, now paths can be combined in the review process
This commit is contained in:
+2
-2
@@ -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"):
|
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")
|
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)
|
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")
|
ct.style_dataframe_dark(pathexclusions, f"preflight\\final_path_exclusions_{first_policy}_{second_policy}.html")
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ def mask_from_csv(df, csv_path, filepath_col):
|
|||||||
# Keep only rows in df that are in approved_files
|
# Keep only rows in df that are in approved_files
|
||||||
masked_df = df[df[filepath_col].isin(approved_files)].copy()
|
masked_df = df[df[filepath_col].isin(approved_files)].copy()
|
||||||
remainder = 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):
|
def filter_and_drop(approved, eligiblepaths, min_hashes):
|
||||||
|
|||||||
Reference in New Issue
Block a user