refactor dict from literal list (#10891)

* refactor dict from literal list

* add changelog frag
This commit is contained in:
Alexei Znamensky
2025-10-11 06:09:10 +13:00
committed by GitHub
parent 14a858fd9c
commit 5f471b8e5b
6 changed files with 17 additions and 14 deletions

View File

@@ -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: