mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-28 22:49:00 +00:00
[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:
parent
50ae8fd7ae
commit
31f0087da9
6 changed files with 12 additions and 9 deletions
|
|
@ -79,7 +79,6 @@ subca:
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.ipa import IPAClient, ipa_argument_spec
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
|
|
@ -215,7 +214,7 @@ def main():
|
|||
changed, record = ensure(module, client)
|
||||
module.exit_json(changed=changed, record=record)
|
||||
except Exception as exc:
|
||||
module.fail_json(msg=to_native(exc))
|
||||
module.fail_json(msg=f"{exc}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue