Browse Source

Merge "Handle absent manufacturer field correctly"

Jenkins 2 years ago
parent
commit
b0ee75ca91
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      agent

+ 2
- 2
agent View File

@@ -1049,10 +1049,10 @@ class NodeAgent
1049 1049
   def _manufacturer
1050 1050
     if _is_virtualbox
1051 1051
       @facter['productname']
1052
-    elsif (@facter['manufacturer'].upcase != 'QEMU' && @facter['is_virtual'])
1052
+    elsif (@facter.fetch('manufacturer', '').upcase != 'QEMU' && @facter['is_virtual'])
1053 1053
       @facter['virtual']
1054 1054
     else
1055
-      @facter['manufacturer']
1055
+      @facter.fetch('manufacturer', '')
1056 1056
     end
1057 1057
   end
1058 1058
 

Loading…
Cancel
Save