1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-27 22:19:02 +00:00

replace redundant to_native()/to_text() occurrences, batch 8 (#11143)

* replace redundant to_native()/to_text() occurrences, batch 8

* add changelog frag

* Update plugins/modules/jira.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2025-11-16 11:18:17 +13:00 committed by GitHub
parent 98aca27a8b
commit 23e81b8d30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 68 additions and 58 deletions

View file

@ -101,7 +101,6 @@ from ansible_collections.community.general.plugins.module_utils.redfish_utils im
RedfishUtils,
REDFISH_COMMON_ARGUMENT_SPEC,
)
from ansible.module_utils.common.text.converters import to_native
class IdracRedfishUtils(RedfishUtils):
@ -217,14 +216,14 @@ def main():
result = rf_utils._find_systems_resource()
rf_utils.data_modification = True
if result["ret"] is False:
module.fail_json(msg=to_native(result["msg"]))
module.fail_json(msg=result["msg"])
for command in command_list:
if command == "CreateBiosConfigJob":
# execute only if we find a Managers resource
result = rf_utils._find_managers_resource()
if result["ret"] is False:
module.fail_json(msg=to_native(result["msg"]))
module.fail_json(msg=result["msg"])
result = rf_utils.create_bios_config_job()
if "job_id" in result:
return_values["job_id"] = result["job_id"]
@ -234,7 +233,7 @@ def main():
del result["ret"]
module.exit_json(changed=True, msg="Action was successful", return_values=return_values)
else:
module.fail_json(msg=to_native(result["msg"]))
module.fail_json(msg=result["msg"])
if __name__ == "__main__":