From 37a601faa06ddfe8a27a9175e9e5be3bee6caab6 Mon Sep 17 00:00:00 2001 From: Chris <156943338+ccroy-arista@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:54:36 -0800 Subject: [PATCH] sonic-mgmt: fix info in testbed_vm_info.py err msg (#15249) In ansible/library/testbed_vm_info.py, there is a format string passed to a method without the actual formatting applied, i.e. the '{}'s are printed out rather than the desired information they're supposed to represent. This change passes the error message to the method with the correct formatting applied. --- ansible/library/testbed_vm_info.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/library/testbed_vm_info.py b/ansible/library/testbed_vm_info.py index c5293be7bf1..19b1a485819 100644 --- a/ansible/library/testbed_vm_info.py +++ b/ansible/library/testbed_vm_info.py @@ -129,8 +129,7 @@ def main(): else: err_msg = "Cannot find the vm {} in VM inventory file {}, please make sure you have enough VMs" \ "for the topology you are using." - err_msg.format(vm_name, vm_facts.vm_file) - module.fail_json(msg=err_msg) + module.fail_json(msg=err_msg.format(vm_name, vm_facts.vm_file)) module.exit_json( ansible_facts={'neighbor_eosvm_mgmt': vm_mgmt_ip, 'topoall': vm_facts.topoall}) except (IOError, OSError):