From 28d792cdbd64c81a9b29d7869bd2d9a93eb8998a Mon Sep 17 00:00:00 2001 From: Georgy Kibardin Date: Mon, 21 Nov 2016 15:30:19 +0300 Subject: [PATCH] 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 ac5c37be5c8f66d7eedaa514b539db5fa7feb1a6) --- agent | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent b/agent index 3c498c5..d6e6272 100755 --- a/agent +++ b/agent @@ -1027,10 +1027,10 @@ class NodeAgent def _manufacturer if _is_virtualbox @facter['productname'] - elsif (@facter['manufacturer'].upcase != 'QEMU' && @facter['is_virtual']) + elsif (@facter.fetch('manufacturer', '').upcase != 'QEMU' && @facter['is_virtual']) @facter['virtual'] else - @facter['manufacturer'] + @facter.fetch('manufacturer', '') end end