From fcb6d2246b2fb1fcfa033ec3fe40bb4377aadbd4 Mon Sep 17 00:00:00 2001 From: Nitin Madhok Date: Tue, 2 Jun 2015 05:32:51 -0400 Subject: [PATCH] Sometimes VMware tools status is unavailable so make sure not to throw a KeyError --- salt/cloud/clouds/vmware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/cloud/clouds/vmware.py b/salt/cloud/clouds/vmware.py index 272f6f94ec..d4b326454f 100644 --- a/salt/cloud/clouds/vmware.py +++ b/salt/cloud/clouds/vmware.py @@ -836,7 +836,7 @@ def _format_instance_info_select(vm, selection): vm_select_info['path'] = vm["config.files.vmPathName"] if 'tools_status' in selection: - vm_select_info['tools_status'] = str(vm["guest.toolsStatus"]) + vm_select_info['tools_status'] = str(vm["guest.toolsStatus"]) if "guest.toolsStatus" in vm else "N/A" if ('private_ips' or 'mac_address' or 'networks') in selection: network_full_info = {}