Commit 1072dc6e authored by Tomas Hlavacek's avatar Tomas Hlavacek

Fix Juniper expect routine failure mode

parent 6190aa06
......@@ -135,10 +135,10 @@ class JuniperRouterRemoteTelnet(JuniperRouter):
s.sendline(self.password)
p+=1
elif(i==2):
elif(i==2): # shell
break
elif(i==3): # EOF -> process output
break
raise Exception("pexpect session failed to authenticate, remote server disconnected.")
elif(i==4):
raise Exception("pexpect session timed out. last output: "+s.before)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment