mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
[PR #11106/f785e9c7 backport][stable-12] replace batch of redundant to_native()/to_text() occurrences (#11140)
replace batch of redundant to_native()/to_text() occurrences (#11106)
* replace batch of redundant to_native()/to_text() occurrences
* add changelog frag
* snap sanity
* rolling back snap for now
* more cases in redhat_subscription
(cherry picked from commit f785e9c780)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -181,8 +181,7 @@ def run():
|
||||
job = dict()
|
||||
job["job"] = job_json
|
||||
except nomad.api.exceptions.BadRequestNomadException as err:
|
||||
msg = f"{err.nomad_resp.reason} {err.nomad_resp.text}"
|
||||
module.fail_json(msg=to_native(msg))
|
||||
module.fail_json(msg=f"{err.nomad_resp.reason} {err.nomad_resp.text}")
|
||||
try:
|
||||
job_id = job_json.get("ID")
|
||||
plan = nomad_client.job.plan_job(job_id, job, diff=True)
|
||||
|
||||
Reference in New Issue
Block a user