1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

clean up empty warnings/deprecations from modules

This commit is contained in:
Brian Coca 2017-01-31 18:13:26 -05:00
parent 10d1865880
commit 16615811b4

View file

@ -680,6 +680,11 @@ class ActionBase(with_metaclass(ABCMeta, object)):
if 'stdout' in data and 'stdout_lines' not in data:
data['stdout_lines'] = data.get('stdout', u'').splitlines()
# remove bad/empty internal keys
for key in ['warnings', 'deprecations']:
if key in data and not data[key]:
del data[key]
display.debug("done with _execute_module (%s, %s)" % (module_name, module_args))
return data