IOTesting #19

Merged
mysticmomba merged 22 commits from IOTesting into master 2025-09-05 11:02:43 -04:00
Showing only changes of commit c618350e94 - Show all commits
+7 -4
View File
@@ -26,7 +26,10 @@ def pullPolicyExechistories(url, policiesnames, days, outputjson: bool):
file_path = 'chunkinator.json' file_path = 'chunkinator.json'
# Initialize file if it doesn't exist # If chunkintor exists - kill and make new
if os.path.exists(file_path):
os.remove(file_path)
if not os.path.exists(file_path): if not os.path.exists(file_path):
with open(file_path, 'w') as file: with open(file_path, 'w') as file:
json.dump({'error': 'Success', 'response': {'exechistories': []}}, file) json.dump({'error': 'Success', 'response': {'exechistories': []}}, file)
@@ -56,10 +59,10 @@ def pullPolicyExechistories(url, policiesnames, days, outputjson: bool):
checkpoints_processed = round(len(histories) / array_dividend) checkpoints_processed = round(len(histories) / array_dividend)
print(ct.colorText( print(ct.colorText(
f"{index + 1}/{checkpoints_processed} checkpoint(s) processed. " f"{index + 1}/{checkpoints_processed} checkpoint(s) processed. " # type: ignore
f"{'Found with Date Match.' if match_found else ''} Last Checkpoint: {item['checkpoint']}.", "blue")) f"{'Found with Date Match.' if match_found else ''} Last Checkpoint: {item['checkpoint']}.", "blue")) # type: ignore
checkpoint = item['checkpoint'] checkpoint = item['checkpoint'] # type: ignore
if match_found: if match_found:
for item in histories: for item in histories: