diff options
author | Claire McQuin <claire@opscode.com> | 2013-09-06 09:45:14 -0700 |
---|---|---|
committer | Claire McQuin <claire@opscode.com> | 2013-09-06 11:34:05 -0700 |
commit | e13c9f83e4d73e08c7ea713a4f883603edb98c0c (patch) | |
tree | 4bab44e05fd1f17e6810545e9f5c1d697e6531a1 /lib/ohai/system.rb | |
parent | 43f4bf4a28ebc2bc4c02a3531d47fc731e153ce9 (diff) | |
download | ohai-e13c9f83e4d73e08c7ea713a4f883603edb98c0c.tar.gz |
run v6 plugins that depend on v7 plugins in Ohai::System#run_plugins, #require_plugin
Diffstat (limited to 'lib/ohai/system.rb')
-rw-r--r-- | lib/ohai/system.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ohai/system.rb b/lib/ohai/system.rb index a906d332..13279c12 100644 --- a/lib/ohai/system.rb +++ b/lib/ohai/system.rb @@ -156,10 +156,13 @@ module Ohai if plugin = @v6_dependency_solver[plugin_name] or plugin = plugin_for(plugin_name) begin - plugin.safe_run + plugin.version.eql?(:version7) ? @runner.run_plugin(plugin, force) : plugin.safe_run true rescue SystemExit, Interrupt raise + rescue DependencyCycleError, NoAttributeError => e + Ohai::Log.error("Encountered error while running plugins: #{e.inspect}") + raise rescue Exception,Errno::ENOENT => e Ohai::Log.debug("Plugin #{plugin_name} threw exception #{e.inspect} #{e.backtrace.join("\n")}") end |