Fix wrong replacements. (#1139)

This commit is contained in:
Felix Fontein 2025-10-04 23:18:11 +02:00 committed by GitHub
parent 1902e0fdf2
commit 82b49c7cf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -1,2 +1,2 @@
bugfixes:
- "Avoid usage of deprecated ``ansible.module_utils.six`` in all code that does not have to support Python 2 (https://github.com/ansible-collections/community.docker/pull/1137)."
- "Avoid usage of deprecated ``ansible.module_utils.six`` in all code that does not have to support Python 2 (https://github.com/ansible-collections/community.docker/pull/1137, https://github.com/ansible-collections/community.docker/pull/1139)."

View File

@ -248,7 +248,7 @@ class Connection(ConnectionBase):
if self.get_option('extra_env'):
for k, v in self.get_option('extra_env').items():
for val, what in ((k, 'Key'), (v, 'Value')):
if not isinstance(val, (str, bytes)):
if not isinstance(val, str):
raise AnsibleConnectionFailure(
'Non-string {0} found for extra_env option. Ambiguous env options must be '
'wrapped in quotes to avoid them being interpreted. {1}: {2!r}'

View File

@ -243,7 +243,7 @@ class Connection(ConnectionBase):
data['Env'] = []
for k, v in self.get_option('extra_env').items():
for val, what in ((k, 'Key'), (v, 'Value')):
if not isinstance(val, (str, bytes)):
if not isinstance(val, str):
raise AnsibleConnectionFailure(
'Non-string {0} found for extra_env option. Ambiguous env options must be '
'wrapped in quotes to avoid them being interpreted. {1}: {2!r}'