From 2342bf95070cba8a6b5f56e78d314033c4984e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Mon, 12 Sep 2022 15:41:59 +0200 Subject: [PATCH] L #-: Fix linting issue --- src/im_mad/remotes/kvm-probes.d/host/system/machines_models.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/im_mad/remotes/kvm-probes.d/host/system/machines_models.rb b/src/im_mad/remotes/kvm-probes.d/host/system/machines_models.rb index 740adf681d..45bd46fd3f 100755 --- a/src/im_mad/remotes/kvm-probes.d/host/system/machines_models.rb +++ b/src/im_mad/remotes/kvm-probes.d/host/system/machines_models.rb @@ -107,7 +107,8 @@ begin domcap_xml = REXML::Document.new(domcapabilities) domcap_xml = domcap_xml.root - cpu_mode_custom_elem = domcap_xml.elements["cpu/mode[@name='custom',@supported='yes']"] + cpu_mode_xpath = "cpu/mode[@name='custom',@supported='yes']" + cpu_mode_custom_elem = domcap_xml.elements[cpu_mode_xpath] cpu_mode_custom_elem.elements.each("model[@usable='no']") do |m| models.delete(m.text)