[PR #11104/4171b8a9 backport][stable-12] replace batch of redundant to_native()/to_text() occurrences (#11138)

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

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

* add changelog frag

(cherry picked from commit 4171b8a9ab)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot]
2025-11-12 21:58:55 +01:00
committed by GitHub
parent 50ae8fd7ae
commit 31f0087da9
6 changed files with 12 additions and 9 deletions

View File

@@ -49,7 +49,6 @@ RETURN = r"""
"""
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_text
class Namespace:
@@ -68,7 +67,7 @@ class Namespace:
"""Check if the namespace already exists"""
rc, out, err = self.module.run_command(["ip", "netns", "list"])
if rc != 0:
self.module.fail_json(msg=to_text(err))
self.module.fail_json(msg=f"{err}")
return self.name in out
def add(self):