From df7f7b24371df947394c2c75e5e3e76b8a95d490 Mon Sep 17 00:00:00 2001 From: Komal Thareja Date: Thu, 2 May 2024 18:07:32 -0400 Subject: [PATCH] improved log message when uuid cant be extracted --- tools/audit.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/audit.py b/tools/audit.py index ddf3eb73..8de1d620 100644 --- a/tools/audit.py +++ b/tools/audit.py @@ -308,7 +308,6 @@ def clean_sliver_inconsistencies(self): # Extract UUID if found if match: sliver_id = match.group(1) - print("Sliver Id:", sliver_id) if sliver_id not in cf_active_sliver_ids: result_2 = self.execute_ansible(inventory_path=inventory_location, playbook_path=vm_playbook_path, @@ -316,7 +315,7 @@ def clean_sliver_inconsistencies(self): ansible_python_interpreter=ansible_python_interpreter) self.logger.info(f"Deleted instance: {vm_name}; result: {result_2.get_json_result_ok()}") else: - print("Sliver Id not found in the input string.") + self.logger.error(f"Sliver Id not found in the input string: {vm_name}") except Exception as e: self.logger.error(f"Failed to cleanup CF and openstack inconsistencies instance: {instance} vm: {vm_name}: {e}") self.logger.error(traceback.format_exc())