1
0
mirror of https://github.com/ansible-collections/community.general.git synced 2025-07-29 07:41:16 +03:00

gconftool2: refactored to use ModuleHelper + CmdRunner (#5545)

* gconftool2: refactored to use ModuleHelper + CmdRunner

* add changelog fragment

* removed old code commented out
This commit is contained in:
Alexei Znamensky
2022-11-16 09:02:45 +13:00
committed by GitHub
parent 6a6bbb6577
commit 6c7e9116e1
10 changed files with 186 additions and 142 deletions

View File

@ -65,8 +65,8 @@ class GConftoolInfo(ModuleHelper):
self.runner = gconftool2_runner(self.module, check_rc=True)
def __run__(self):
with self.runner.context(args_order=["get", "key"]) as ctx:
rc, out, err = ctx.run(get=True)
with self.runner.context(args_order=["state", "key"]) as ctx:
rc, out, err = ctx.run(state="get")
self.vars.value = None if err and not out else out.rstrip()