summaryrefslogtreecommitdiff
path: root/lib/oxidized/node.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-05-16 15:47:43 +0300
committerSaku Ytti <saku@ytti.fi>2014-05-16 15:47:43 +0300
commita6431e29cf72e28fd151374bacea1a3b2c61c396 (patch)
treee5146652dcd881553f16350f9e114a5fb8b186e2 /lib/oxidized/node.rb
parent6cb51eb847e9e0edd18b3a803280ad4e31dc6abe (diff)
don't store error Node raised
We may need this in future, but as we don't need this in oxidized-script now after all, I don't want something to be implemented just-in-case
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r--lib/oxidized/node.rb6
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