mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
parent
0bc35354ce
commit
4a067c3f50
3 changed files with 10 additions and 8 deletions
|
@ -35,6 +35,7 @@ from ansible.module_utils.network import add_argument, register_transport, to_li
|
|||
from ansible.module_utils.netcli import Command
|
||||
from ansible.module_utils.shell import CliBase
|
||||
from ansible.module_utils.urls import fetch_url, url_argument_spec
|
||||
from ansible.module_utils._text import to_native
|
||||
|
||||
EAPI_FORMATS = ['json', 'text']
|
||||
|
||||
|
@ -88,7 +89,7 @@ class EosConfigMixin(object):
|
|||
self.execute(['no configure session %s' % session])
|
||||
except NetworkError:
|
||||
exc = get_exception()
|
||||
if 'timeout trying to send command' in exc.message:
|
||||
if 'timeout trying to send command' in to_native(exc):
|
||||
# try to get control back and get out of config mode
|
||||
if isinstance(self, Cli):
|
||||
self.execute(['\x03', 'end'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue