X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=pcucontrol%2Fmodels%2FDRAC.py;h=e3172b6246dcf35979fbb99173ddea212b012086;hb=ebab64974b52073272891fcbc9bd682067f0a25c;hp=a64a87d08f53dd1d613403ef59a007a160c9c7cb;hpb=9309fc6b483ef69dc775085263653f3fda3f1b65;p=monitor.git diff --git a/pcucontrol/models/DRAC.py b/pcucontrol/models/DRAC.py index a64a87d..e3172b6 100644 --- a/pcucontrol/models/DRAC.py +++ b/pcucontrol/models/DRAC.py @@ -12,10 +12,13 @@ class DRAC(PCUControl): "-o PasswordAuthentication=yes "+\ "-o PubkeyAuthentication=no" s = pxssh.pxssh() - if not s.login(self.host, self.username, self.password, ssh_options, + try: + if not s.login(self.host, self.username, self.password, ssh_options, original_prompts="Dell", login_timeout=Transport.TELNET_TIMEOUT): - raise ExceptionPassword("Invalid Password") - + raise ExceptionPassword("Invalid Password") + except pexpect.EOF: + raise ExceptionPrompt("Disconnect before login prompt") + print "logging in... %s" % self.host s.send("\r\n\r\n") try: