Two feature adds: Secondary Paths are now generated, along with all the hashes that are not part of the path exclusions. Added remove/reset data feature
This commit is contained in:
+18
-10
@@ -90,16 +90,21 @@ def apivalidation():
|
||||
|
||||
|
||||
def tryToReadCSV(csv):
|
||||
try:
|
||||
df =pd.read_csv(csv)
|
||||
if df.empty:
|
||||
print(ct.colorText("Error: CSV file has headers but no data rows.", "red"))
|
||||
else:
|
||||
print(ct.colorText(f"Data loaded successfully from {csv}", "green"))
|
||||
except pd.errors.EmptyDataError:
|
||||
print(ct.colorText("Notice : CSV file is completely empty (no headers, no data), falling back to empty frame", "white"))
|
||||
df = pd.DataFrame() # Create an empty DataFrame as fallback
|
||||
return df
|
||||
try:
|
||||
if not os.path.exists(csv):
|
||||
print(ct.colorText(f"Error: File '{csv}' does not exist.", "red"))
|
||||
return pd.DataFrame() # Return empty DataFrame if file doesn't exist
|
||||
|
||||
df = pd.read_csv(csv)
|
||||
if df.empty:
|
||||
print(ct.colorText("Error: CSV file has headers but no data rows.", "red"))
|
||||
else:
|
||||
print(ct.colorText(f"Data loaded successfully from {csv}", "green"))
|
||||
except pd.errors.EmptyDataError:
|
||||
print(ct.colorText("Notice: CSV file is completely empty (no headers, no data), falling back to empty frame", "white"))
|
||||
df = pd.DataFrame() # Create an empty DataFrame as fallback
|
||||
return df
|
||||
|
||||
|
||||
def tryToReadParquet(parquet):
|
||||
try:
|
||||
@@ -479,6 +484,9 @@ def menu_prepare_to_enforce():
|
||||
allowlist_child_name,
|
||||
allowlist_child_id
|
||||
)
|
||||
elif choice == "R":
|
||||
|
||||
utils.pathfunctions.clean_folders_enforcement_prep()
|
||||
|
||||
elif choice == "Q":
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user