mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix vmware property filter (#23228)
Fixes errors on properties that do not exist.
This commit is contained in:
parent
3e1a16c574
commit
25019fe70c
1 changed files with 4 additions and 1 deletions
|
@ -560,7 +560,10 @@ class VMWareInventory(object):
|
||||||
|
|
||||||
# if the val wasn't set yet, get it from the parent
|
# if the val wasn't set yet, get it from the parent
|
||||||
if not val:
|
if not val:
|
||||||
val = getattr(vm, x)
|
try:
|
||||||
|
val = getattr(vm, x)
|
||||||
|
except AttributeError as e:
|
||||||
|
self.debugl(e)
|
||||||
else:
|
else:
|
||||||
# in a subkey, get the subprop from the previous attrib
|
# in a subkey, get the subprop from the previous attrib
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue