1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-02 00:12:54 +00:00

update code to python3 (#10903)

* update code to python3

* add changelog frag

* rollback adjustment for plugins/lookup/lmdb_kv.py

* accept PR suggestion for plugins/module_utils/utm_utils.py

* accept PR suggestion for plugins/module_utils/vexata.py

* Apply suggestions from code review

* Update changelogs/fragments/10903-2to3.yml

* Update changelogs/fragments/10903-2to3.yml
This commit is contained in:
Alexei Znamensky 2025-10-12 22:05:57 +13:00 committed by GitHub
parent 056633efaa
commit 07cfd6c4b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 18 additions and 24 deletions

View file

@ -525,9 +525,9 @@ class Connection(ConnectionBase):
raise AnsibleAuthenticationFailure(msg)
except Exception as e:
msg = to_text(e)
if u'PID check failed' in msg:
if 'PID check failed' in msg:
raise AnsibleError('paramiko version issue, please upgrade paramiko on the machine running ansible')
elif u'Private key file is encrypted' in msg:
elif 'Private key file is encrypted' in msg:
msg = (
f'ssh {self.get_option("remote_user")}@{self.get_options("remote_addr")}:{port} : '
f'{msg}\nTo connect as a different user, use -u <username>.'