From 25019fe70ca170f9f3625163ff52957f4ab4bddb Mon Sep 17 00:00:00 2001 From: rafstef Date: Mon, 3 Apr 2017 21:22:58 +0200 Subject: [PATCH] Fix vmware property filter (#23228) Fixes errors on properties that do not exist. --- contrib/inventory/vmware_inventory.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/inventory/vmware_inventory.py b/contrib/inventory/vmware_inventory.py index c175830883..893ff5866b 100755 --- a/contrib/inventory/vmware_inventory.py +++ b/contrib/inventory/vmware_inventory.py @@ -560,7 +560,10 @@ class VMWareInventory(object): # if the val wasn't set yet, get it from the parent if not val: - val = getattr(vm, x) + try: + val = getattr(vm, x) + except AttributeError as e: + self.debugl(e) else: # in a subkey, get the subprop from the previous attrib try: