[PR #11143/23e81b8d backport][stable-12] replace redundant to_native()/to_text() occurrences, batch 8 (#11164)

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



---------


(cherry picked from commit 23e81b8d30)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2025-11-16 07:09:40 +01:00
committed by GitHub
parent 15d4fff749
commit 8a7f360558
22 changed files with 68 additions and 58 deletions

View File

@@ -165,7 +165,7 @@ def main():
# Check that Category is valid
if category not in CATEGORY_COMMANDS_ALL:
module.fail_json(
msg=to_native(f"Invalid Category '{category}'. Valid Categories = {sorted(CATEGORY_COMMANDS_ALL.keys())}")
msg=f"Invalid Category '{category}'. Valid Categories = {sorted(CATEGORY_COMMANDS_ALL.keys())}"
)
# Check that all commands are valid
@@ -192,7 +192,9 @@ def main():
if command == "SimpleUpdateStatus":
simple_update_status_result = rf_utils.get_simple_update_status()
if simple_update_status_result["ret"] is False:
module.fail_json(msg=to_native(result["msg"]))
module.fail_json(
msg=to_native(result["msg"])
) # TODO result=={}, maybe simple_update_status_result?
else:
del simple_update_status_result["ret"]
result["simple_update_status"] = simple_update_status_result