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

Ensure alternatives are displayed in deprecation warnings

Use plural `alternatives` key to display deprecation alternatives.
This commit is contained in:
Will Thames 2018-01-10 10:07:06 +10:00 committed by Brian Coca
parent 232dc7110c
commit 9cb0c08d75

View file

@ -173,8 +173,8 @@ class CLI(with_metaclass(ABCMeta, object)):
for deprecated in C.config.DEPRECATED:
name = deprecated[0]
why = deprecated[1]['why']
if 'alternative' in deprecated[1]:
alt = ', use %s instead' % deprecated[1]['alternative']
if 'alternatives' in deprecated[1]:
alt = ', use %s instead' % deprecated[1]['alternatives']
else:
alt = ''
ver = deprecated[1]['version']