1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

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

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

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-11-13 09:42:52 +13:00 committed by GitHub
parent 4171b8a9ab
commit 9b8867399e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View file

@ -74,7 +74,6 @@ import ssl
import xmlrpc.client as xmlrpc_client
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_text
from ansible_collections.community.general.plugins.module_utils.datetime import (
now,
@ -120,7 +119,7 @@ def main():
except xmlrpc_client.Fault as e:
module.fail_json(
msg="Failed to log in to Cobbler '{url}' as '{username}'. {error}".format(
url=url, error=to_text(e), **module.params
url=url, error=f"{e}", **module.params
)
)
except Exception as e:

View file

@ -151,7 +151,6 @@ import ssl
import xmlrpc.client as xmlrpc_client
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_text
from ansible_collections.community.general.plugins.module_utils.datetime import (
now,
@ -241,7 +240,7 @@ def main():
except xmlrpc_client.Fault as e:
module.fail_json(
msg="Failed to log in to Cobbler '{url}' as '{username}'. {error}".format(
url=url, error=to_text(e), **module.params
url=url, error=f"{e}", **module.params
)
)
except Exception as e: