If the error is an authentication exception - just report it that way don't dump out an unappetizing traceback which just says the same
This commit is contained in:
parent
5781e6e02f
commit
1a20b00d1f
1 changed files with 2 additions and 0 deletions
|
@ -108,6 +108,8 @@ class Runner(object):
|
||||||
ssh.connect(host, username=self.remote_user, allow_agent=True,
|
ssh.connect(host, username=self.remote_user, allow_agent=True,
|
||||||
look_for_keys=True, password=self.remote_pass)
|
look_for_keys=True, password=self.remote_pass)
|
||||||
return [ True, ssh ]
|
return [ True, ssh ]
|
||||||
|
except paramiko.AuthenticationException, e:
|
||||||
|
return [ False, str(e) ]
|
||||||
except:
|
except:
|
||||||
# it failed somehow, return the failure string
|
# it failed somehow, return the failure string
|
||||||
return [ False, traceback.format_exc() ]
|
return [ False, traceback.format_exc() ]
|
||||||
|
|
Loading…
Reference in a new issue