mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 01:33:09 +00:00
Merge pull request #17279 from privateip/shell
catches timeout error when connecting to remote host in shell
This commit is contained in:
@@ -106,6 +106,11 @@ class Shell(object):
|
||||
raise ShellError("unable to resolve host name")
|
||||
except AuthenticationException:
|
||||
raise ShellError('Unable to authenticate to remote device')
|
||||
except socket.error:
|
||||
exc = get_exception()
|
||||
if exc.errno == 60:
|
||||
raise ShellError('timeout trying to connect to host')
|
||||
raise
|
||||
|
||||
if self.kickstart:
|
||||
self.shell.sendall("\n")
|
||||
|
||||
Reference in New Issue
Block a user