From a83af3146996a461a79d50856e99aa74f62f8c09 Mon Sep 17 00:00:00 2001 From: jgstew Date: Thu, 14 Mar 2024 15:21:11 -0400 Subject: [PATCH] improve trigger path handling --- examples/baseline_plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/baseline_plugin.py b/examples/baseline_plugin.py index c547d5b..44a8827 100644 --- a/examples/baseline_plugin.py +++ b/examples/baseline_plugin.py @@ -269,12 +269,15 @@ def main(): "trigger_file_path" ] - if test_file_exists(trigger_path): + # check if file exists, if so, return path, else return false: + trigger_path = test_file_exists(trigger_path) + + if trigger_path: process_baselines( config_yaml["bigfix"]["content"]["Baselines"]["automation"]["sites"] ) # delete trigger file - os.remove(test_file_exists(trigger_path)) + os.remove(trigger_path) else: logging.info( "Trigger File `%s` Does Not Exists, skipping execution!", trigger_path