Trim errors on connection refused messages
This commit is contained in:
parent
a40ac93716
commit
ab266472be
1 changed files with 2 additions and 4 deletions
|
@ -115,11 +115,9 @@ 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:
|
except Exception, e:
|
||||||
return [ False, str(e) ]
|
|
||||||
except:
|
|
||||||
# it failed somehow, return the failure string
|
# it failed somehow, return the failure string
|
||||||
return [ False, traceback.format_exc() ]
|
return [ False, str(e) ]
|
||||||
|
|
||||||
def _return_from_module(self, conn, host, result):
|
def _return_from_module(self, conn, host, result):
|
||||||
''' helper function to handle JSON parsing of results '''
|
''' helper function to handle JSON parsing of results '''
|
||||||
|
|
Loading…
Reference in a new issue