summaryrefslogtreecommitdiff
path: root/lib/ohai/system.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/system.rb')
-rw-r--r--lib/ohai/system.rb5
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