summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-08-19 15:42:23 +0300
committerGitHub <noreply@github.com>2016-08-19 15:42:23 +0300
commit8ef086796a22914dcc52febb4dfc84df56e05438 (patch)
tree27657c05aa7cc5a7b61e9e85fe8f8c351dc1e0de
parent3e504151fa859cc98b8664214ca7f8e1b94d176e (diff)
parentf2fb873d0d99650bc538e49ca46de3acc6e6b544 (diff)
Merge pull request #533 from andir/disconnect_unexpected_prompt
Disconnect input when expected prompt wasn't found
-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