Handle absent manufacturer field correctly
The section can be absent on some BIOSes. Agent must not fail in this
case.
Change-Id: I931e4c7f3549fc82663f6a6ccfb51b5c4e912fe7
Closes-Bug: #1643192
(cherry picked from commit ac5c37be5c
)
This commit is contained in:
parent
f2fac02c80
commit
0cfe06be93
4
agent
4
agent
@ -1049,10 +1049,10 @@ class NodeAgent
|
|||||||
def _manufacturer
|
def _manufacturer
|
||||||
if _is_virtualbox
|
if _is_virtualbox
|
||||||
@facter['productname']
|
@facter['productname']
|
||||||
elsif (@facter['manufacturer'].upcase != 'QEMU' && @facter['is_virtual'])
|
elsif (@facter.fetch('manufacturer', '').upcase != 'QEMU' && @facter['is_virtual'])
|
||||||
@facter['virtual']
|
@facter['virtual']
|
||||||
else
|
else
|
||||||
@facter['manufacturer']
|
@facter.fetch('manufacturer', '')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user