diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/node.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 456168b..0f4c525 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -4,7 +4,7 @@ module Oxidized class MethodNotFound < OxidizedError; end class ModelNotFound < OxidizedError; end class Node - attr_reader :name, :ip, :model, :input, :output, :group, :auth, :prompt, :vars, :last, :error + attr_reader :name, :ip, :model, :input, :output, :group, :auth, :prompt, :vars, :last attr_accessor :running, :user, :msg, :from, :stats alias :running? :running def initialize opt @@ -24,7 +24,7 @@ module Oxidized end def run - status, config, @error = :fail, nil, nil + status, config = :fail, nil @input.each do |input| @model.input = input = input.new if config=run_input(input) @@ -52,7 +52,6 @@ module Oxidized input.get end rescue *rescue_fail.keys => err - @error = err resc = '' if not level = rescue_fail[err.class] resc = err.class.ancestors.find{|e|rescue_fail.keys.include? e} @@ -62,7 +61,6 @@ module Oxidized Log.send(level, '%s raised %s%s with msg "%s"' % [self.ip, err.class, resc, err.message]) return false rescue => err - @error = err file = Oxidized::Config::Crash + '.' + self.ip.to_s open file, 'w' do |fh| fh.puts Time.now.utc |