mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-03 14:59:09 -07:00
[PR #9171/152339a8 backport][stable-10] gio_mime: fix bug when looking for version (#9177)
gio_mime: fix bug when looking for version (#9171)
* gio_mime: fix bug when looking for version
* add changelog frag
(cherry picked from commit 152339a8f9
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
653ae1b48a
commit
0ff52abfdd
4 changed files with 10 additions and 8 deletions
|
@ -12,8 +12,9 @@ from ansible_collections.community.general.plugins.module_utils.cmd_runner impor
|
|||
def gio_mime_runner(module, **kwargs):
|
||||
return CmdRunner(
|
||||
module,
|
||||
command=['gio', 'mime'],
|
||||
command=['gio'],
|
||||
arg_formats=dict(
|
||||
mime=cmd_runner_fmt.as_fixed('mime'),
|
||||
mime_type=cmd_runner_fmt.as_list(),
|
||||
handler=cmd_runner_fmt.as_list(),
|
||||
version=cmd_runner_fmt.as_fixed('--version'),
|
||||
|
@ -29,5 +30,5 @@ def gio_mime_get(runner, mime_type):
|
|||
out = out.splitlines()[0]
|
||||
return out.split()[-1]
|
||||
|
||||
with runner("mime_type", output_process=process) as ctx:
|
||||
with runner("mime mime_type", output_process=process) as ctx:
|
||||
return ctx.run(mime_type=mime_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue