diff options
author | Thom May <thom@may.lt> | 2015-05-20 10:07:43 +0100 |
---|---|---|
committer | Thom May <thom@may.lt> | 2015-05-20 10:07:43 +0100 |
commit | b7403d562b1b829e9802375cc0e62298bdd7e268 (patch) | |
tree | d0427f70739ddd8125046f8805d646a5d951440a | |
parent | 75635d898b2898f9b69efec1f6d56bde19757838 (diff) | |
download | ohai-tm/ignore_unwanted_dmi.tar.gz |
Correctly ignore unwanted DMI datatm/ignore_unwanted_dmi
Closes #538 and closes #500
-rw-r--r-- | lib/ohai/plugins/dmi.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ohai/plugins/dmi.rb b/lib/ohai/plugins/dmi.rb index 24779ef2..e2349339 100644 --- a/lib/ohai/plugins/dmi.rb +++ b/lib/ohai/plugins/dmi.rb @@ -75,7 +75,10 @@ Ohai.plugin(:DMI) do elsif handle = handle_line.match(line) # Don't overcapture for now (OHAI-260) - next unless Ohai::Common::DMI::IdToCapture.include?(handle[2].to_i) + unless Ohai::Common::DMI::IdToCapture.include?(handle[2].to_i) + dmi_record = nil + next + end dmi_record = {:type => Ohai::Common::DMI.id_lookup(handle[2])} |