Skip to content

Commit

Permalink
Handle NoneType error in vmware_host_service_info (#67641)
Browse files Browse the repository at this point in the history
Handle NoneType error occured due to accessing host system service info
in vmware_host_service_info module.

Fixes: #67615

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
  • Loading branch information
Akasurde committed Feb 22, 2020
1 parent 482885e commit 6936e7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/67615-vmware_host_service_info_fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- Handle NoneType error when accessing service system info in vmware_host_service_info module (https://github.com/ansible/ansible/issues/67615).
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def gather_host_info(self):
for host in self.hosts:
host_service_info = []
host_service_system = host.configManager.serviceSystem
if host_service_system:
if host_service_system and host_service_system.serviceInfo:
services = host_service_system.serviceInfo.service
for service in services:
host_service_info.append(
Expand Down

0 comments on commit 6936e7b

Please sign in to comment.