summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2016-08-19 14:13:50 +0200
committerAndreas Rammhold <andreas@rammhold.de>2016-08-19 14:13:50 +0200
commitf2fb873d0d99650bc538e49ca46de3acc6e6b544 (patch)
tree27657c05aa7cc5a7b61e9e85fe8f8c351dc1e0de /lib
parent3e504151fa859cc98b8664214ca7f8e1b94d176e (diff)
Disconnect input when expected prompt wasn't found
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/input/cli.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/oxidized/input/cli.rb b/lib/oxidized/input/cli.rb
index fc7f426..660e173 100644
--- a/lib/oxidized/input/cli.rb
+++ b/lib/oxidized/input/cli.rb
@@ -14,6 +14,9 @@ module Oxidized
d = node.model.get
disconnect
d
+ rescue PromptUndetect
+ disconnect
+ raise
end
def connect_cli