mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
adds additional exception handling in open() (#18003)
The open() method will now catch a socket.timeout exception and raise a ShellError.
This commit is contained in:
@@ -106,6 +106,8 @@ class Shell(object):
|
||||
raise ShellError("unable to resolve host name")
|
||||
except AuthenticationException:
|
||||
raise ShellError('Unable to authenticate to remote device')
|
||||
except socket.timeout:
|
||||
raise ShellError("timeout trying to connect to remote device")
|
||||
except socket.error:
|
||||
exc = get_exception()
|
||||
if exc.errno == 60:
|
||||
|
||||
Reference in New Issue
Block a user