Fix calling deprecate with correct arguments (#44726)

This fixes #44702
pull/45993/head
Dag Wieers 6 years ago committed by Brian Coca
parent 574ed8dc7f
commit 66eec42f53

@ -2327,6 +2327,8 @@ class AnsibleModule(object):
for d in kwargs['deprecations']: for d in kwargs['deprecations']:
if isinstance(d, SEQUENCETYPE) and len(d) == 2: if isinstance(d, SEQUENCETYPE) and len(d) == 2:
self.deprecate(d[0], version=d[1]) self.deprecate(d[0], version=d[1])
elif isinstance(d, Mapping):
self.deprecate(d['msg'], version=d.get('version', None))
else: else:
self.deprecate(d) self.deprecate(d)
else: else:

Loading…
Cancel
Save