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
This commit is contained in:
Sergii Rizvan 2016-10-31 17:50:53 +02:00
parent b8a2f95f0f
commit af1e5da094
1 changed files with 1 additions and 1 deletions

2
agent
View File

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