mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
gio_mime: adjust module for old vardict deprecation (#8855)
* gio_mime: adjust module for old vardict deprecation * add changelog frag
This commit is contained in:
parent
40f1ab31f5
commit
41d87f5c9d
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/8855-gio_mime_vardict.yml
Normal file
2
changelogs/fragments/8855-gio_mime_vardict.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- gio_mime - adjust code ahead of the old ``VardDict`` deprecation (https://github.com/ansible-collections/community.general/pull/8855).
|
|
@ -84,7 +84,7 @@ class GioMime(ModuleHelper):
|
|||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
mute_vardict_deprecation = True
|
||||
use_old_vardict = False
|
||||
|
||||
def __init_module__(self):
|
||||
self.runner = gio_mime_runner(self.module, check_rc=True)
|
||||
|
@ -92,7 +92,7 @@ class GioMime(ModuleHelper):
|
|||
|
||||
def __run__(self):
|
||||
check_mode_return = (0, 'Module executed in check mode', '')
|
||||
if self.vars.has_changed("handler"):
|
||||
if self.vars.has_changed:
|
||||
with self.runner.context(args_order=["mime_type", "handler"], check_mode_skip=True, check_mode_return=check_mode_return) as ctx:
|
||||
rc, out, err = ctx.run()
|
||||
self.vars.stdout = out
|
||||
|
|
Loading…
Reference in a new issue