mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Do not use str() on exceptions (#46950)
This commit is contained in:
parent
2436aa1a4e
commit
a80c25cbd9
30 changed files with 76 additions and 66 deletions
|
@ -296,7 +296,7 @@ class Connection(NetworkConnectionBase):
|
|||
ssh_config=ssh_config
|
||||
)
|
||||
except SSHUnknownHostError as exc:
|
||||
raise AnsibleConnectionFailure(str(exc))
|
||||
raise AnsibleConnectionFailure(to_native(exc))
|
||||
except ImportError as exc:
|
||||
raise AnsibleError("connection=netconf is not supported on {0}".format(self._network_os))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue