summaryrefslogtreecommitdiff
path: root/lib/ohai/runner.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-01-07 10:05:59 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-01-07 10:05:59 -0800
commita6ce4ee1d3abb15b633ee01b779aa92317ea3aa9 (patch)
tree46a1ce734aedfd32b43ce28dd221cad77fe44348 /lib/ohai/runner.rb
parenta43137a5432cd2e53c6d7adbae11c67d2a9fd3ca (diff)
downloadohai-a6ce4ee1d3abb15b633ee01b779aa92317ea3aa9.tar.gz
rescue exceptions thrown collecting data
back out the require 'sigar' hack
Diffstat (limited to 'lib/ohai/runner.rb')
-rw-r--r--lib/ohai/runner.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/ohai/runner.rb b/lib/ohai/runner.rb
index 4b654d66..157b96b1 100644
--- a/lib/ohai/runner.rb
+++ b/lib/ohai/runner.rb
@@ -42,13 +42,17 @@ module Ohai
return false
end
- case plugin.version
- when :version7
- run_v7_plugin(plugin, force)
- when :version6
- run_v6_plugin(plugin, force)
- else
- raise ArgumentError, "Invalid plugin version #{plugin.version} for plugin #{plugin}"
+ begin
+ case plugin.version
+ when :version7
+ run_v7_plugin(plugin, force)
+ when :version6
+ run_v6_plugin(plugin, force)
+ else
+ raise ArgumentError, "Invalid plugin version #{plugin.version} for plugin #{plugin}"
+ end
+ rescue Exception,Errno::ENOENT => e
+ Ohai::Log.debug("Plugin #{plugin.name} threw exception #{e.inspect} #{e.backtrace.join("\n")}")
end
end