Fix calling deprecate with correct arguments (#44726)

This fixes #44702

Signed-off-by: Ondra Machacek <omachace@redhat.com>
pull/46289/head
Dag Wieers 6 years ago committed by Toshio Kuratomi
parent 637c9b3c5f
commit 4b80f8c8e3

@ -0,0 +1,2 @@
bugfixes:
- Fix calling deprecate with correct arguments (https://github.com/ansible/ansible/pull/46062).

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

Loading…
Cancel
Save