summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRoman Belyakovsky <ihryamzik@gmail.com>2017-02-21 14:53:40 +0100
committerjctanner <tanner.jc@gmail.com>2017-02-21 08:53:40 -0500
commitaa6585942ed04fe43be939c7335f110fe393a3a9 (patch)
tree9c8b881edd12faa996085e4a5b082b7b1f66bdb2 /contrib
parentd144cf9c27e2bc13c78eacaee4b1482f9f35c294 (diff)
downloadansible-aa6585942ed04fe43be939c7335f110fe393a3a9.tar.gz
Fix for crash on missing privileges, closes #21051 (#21518)
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/inventory/vmware_inventory.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/inventory/vmware_inventory.py b/contrib/inventory/vmware_inventory.py
index f3cbd5fbec..58ee473dca 100755
--- a/contrib/inventory/vmware_inventory.py
+++ b/contrib/inventory/vmware_inventory.py
@@ -628,7 +628,10 @@ class VMWareInventory(object):
elif type(vobj) in self.vimTable:
rdata = {}
for key in self.vimTable[type(vobj)]:
- rdata[key] = getattr(vobj, key)
+ try:
+ rdata[key] = getattr(vobj, key)
+ except Exception as e:
+ self.debugl(e)
elif issubclass(type(vobj), str) or isinstance(vobj, str):
if vobj.isalnum():