Check solaris 'smbios' is exists before running it

smbios could potentially be None here, possibly causing
the solaris 8/9 failures seen at #19282

Fixes #19282
This commit is contained in:
Adrian Likins 2016-12-16 11:45:51 -05:00 committed by Brian Coca
parent 5204024f35
commit 5cd7a08418

View file

@ -3591,6 +3591,8 @@ class SunOSVirtual(Virtual):
else: else:
smbios = self.module.get_bin_path('smbios') smbios = self.module.get_bin_path('smbios')
if not smbios:
return
rc, out, err = self.module.run_command(smbios) rc, out, err = self.module.run_command(smbios)
if rc == 0: if rc == 0:
for line in out.splitlines(): for line in out.splitlines():