1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-23 04:09:04 +00:00

[PR #11106/f785e9c7 backport][stable-12] replace batch of redundant to_native()/to_text() occurrences (#11140)

replace batch of redundant to_native()/to_text() occurrences (#11106)

* replace batch of redundant to_native()/to_text() occurrences

* add changelog frag

* snap sanity

* rolling back snap for now

* more cases in redhat_subscription

(cherry picked from commit f785e9c780)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-11-12 21:59:09 +01:00 committed by GitHub
parent 4b9ece4fbd
commit 619ea5b7b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 47 additions and 45 deletions

View file

@ -120,7 +120,6 @@ id:
"""
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils.common.text.converters import to_native
HAS_PACKET_SDK = True
@ -163,7 +162,7 @@ def act_on_project(target_state, module, packet_conn):
result_dict["id"] = matching_projects[0].id
else:
if len(matching_projects) > 1:
_msg = f"More than projects matched for module call with state = absent: {to_native(matching_projects)}"
_msg = f"More than projects matched for module call with state = absent: {matching_projects}"
module.fail_json(msg=_msg)
if len(matching_projects) == 1: