mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
[PR #10891/5f471b8e backport][stable-11] refactor dict from literal list (#10895)
refactor dict from literal list (#10891)
* refactor dict from literal list
* add changelog frag
(cherry picked from commit 5f471b8e5b)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -205,9 +205,9 @@ class PacemakerResource(StateModuleHelper):
|
||||
def _get(self):
|
||||
with self.runner('cli_action state name') as ctx:
|
||||
result = ctx.run(cli_action="resource", state='status')
|
||||
return dict([('rc', result[0]),
|
||||
('out', result[1] if result[1] != "" else None),
|
||||
('err', result[2])])
|
||||
return dict(rc=result[0],
|
||||
out=(result[1] if result[1] != "" else None),
|
||||
err=result[2])
|
||||
|
||||
def fmt_as_stack_argument(self, value, arg):
|
||||
if value is not None:
|
||||
|
||||
Reference in New Issue
Block a user