diff options
author | Roman Belyakovsky <ihryamzik@gmail.com> | 2017-02-21 14:53:40 +0100 |
---|---|---|
committer | jctanner <tanner.jc@gmail.com> | 2017-02-21 08:53:40 -0500 |
commit | aa6585942ed04fe43be939c7335f110fe393a3a9 (patch) | |
tree | 9c8b881edd12faa996085e4a5b082b7b1f66bdb2 /contrib | |
parent | d144cf9c27e2bc13c78eacaee4b1482f9f35c294 (diff) | |
download | ansible-aa6585942ed04fe43be939c7335f110fe393a3a9.tar.gz |
Fix for crash on missing privileges, closes #21051 (#21518)
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/inventory/vmware_inventory.py | 5 |
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(): |