summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized')
-rw-r--r--lib/oxidized/hook/exec.rb4
-rw-r--r--lib/oxidized/input/telnet.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/oxidized/hook/exec.rb b/lib/oxidized/hook/exec.rb
index 8a32412..069b888 100644
--- a/lib/oxidized/hook/exec.rb
+++ b/lib/oxidized/hook/exec.rb
@@ -52,11 +52,11 @@ class Exec < Oxidized::Hook
raise msg
end
end
- rescue TimeoutError
+ rescue Timeout::Error
kill "TERM", pid
msg = "#{@cmd} timed out"
log msg, :error
- raise TimeoutError, msg
+ raise Timeout::Error, msg
end
def make_env ctx
diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb
index 4371e26..b1b3222 100644
--- a/lib/oxidized/input/telnet.rb
+++ b/lib/oxidized/input/telnet.rb
@@ -102,7 +102,7 @@ class Net::Telnet
rest = ''
until prompt === line and not IO::select([@sock], nil, nil, waittime)
unless IO::select([@sock], nil, nil, time_out)
- raise TimeoutError, "timed out while waiting for more data"
+ raise Timeout::Error, "timed out while waiting for more data"
end
begin
c = @sock.readpartial(1024 * 1024)