From e13c9f83e4d73e08c7ea713a4f883603edb98c0c Mon Sep 17 00:00:00 2001 From: Claire McQuin Date: Fri, 6 Sep 2013 09:45:14 -0700 Subject: run v6 plugins that depend on v7 plugins in Ohai::System#run_plugins, #require_plugin --- lib/ohai/system.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/ohai/system.rb') 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 -- cgit v1.2.1