mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user