Browse Source

Add .chomp to a system output operation

In the _get_pci_dev_list method adding .chomp is needed to the
`cat /etc/nailgun_systemtype` operation in order to make a correct
comparison with 'bootstrap' string.

Change-Id: Id2fdc4c7b7bd7604c43803da594480bf865cf1cb
Related-Bug: #1554970
tags/11.0.0.0rc1
Sergii Rizvan 2 years ago
parent
commit
af1e5da094
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      agent

+ 1
- 1
agent View File

@@ -1208,7 +1208,7 @@ class NodeAgent
1208 1208
   end
1209 1209
 
1210 1210
   def _get_pci_dev_list
1211
-    return {} if `cat /etc/nailgun_systemtype` != 'bootstrap'
1211
+    return {} if `cat /etc/nailgun_systemtype`.chomp != 'bootstrap'
1212 1212
     lshw_timeout = @settings['lshw_timeout'] || 60
1213 1213
     Timeout::timeout(lshw_timeout) do
1214 1214
       lshw_path = `which lshw`.chomp

Loading…
Cancel
Save