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

Fixes 'choices referenced before assignment' error on line #287.

This commit is contained in:
chouseknecht 2016-08-23 16:21:26 -04:00
parent a695e18615
commit fdb5ecd7d1
No known key found for this signature in database
GPG key ID: 78F1698C5705A81B

View file

@ -280,6 +280,7 @@ class DocCLI(CLI):
else:
text.append(textwrap.fill(CLI.tty_ify(opt['description']), limit, initial_indent=opt_indent, subsequent_indent=opt_indent))
choices = ''
if 'choices' in opt:
choices = "(Choices: " + ", ".join(str(i) for i in opt['choices']) + ")"
if 'default' in opt or not required: