mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-17 01:11:28 +00:00
replace concatenations with f-string in plugins (#10285)
* replace concatenations with f-string in plugins * add changelog frag
This commit is contained in:
parent
d4f2b2fb55
commit
3ab7a898c6
7 changed files with 20 additions and 14 deletions
|
|
@ -212,7 +212,8 @@ class CallbackModule(CallbackBase):
|
|||
if self.itembody:
|
||||
body += self.itembody
|
||||
elif result._result.get('failed_when_result') is True:
|
||||
fail_cond = self.indent('failed_when:\n- ' + '\n- '.join(result._task.failed_when))
|
||||
fail_cond_list = '\n- '.join(result._task.failed_when)
|
||||
fail_cond = self.indent(f"failed_when:\n- {fail_cond_list}")
|
||||
body += f"due to the following condition:\n\n{fail_cond}\n\n"
|
||||
elif result._result.get('msg'):
|
||||
body += self.body_blob(result._result['msg'], 'message')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue