fix error reporting when installer option is supplied with invalid choice

https://fedorahosted.org/freeipa/ticket/5433

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Martin Babinsky 2015-11-06 10:05:42 +01:00 committed by Martin Basti
parent 9f3e8943a7
commit b6a2a1cfd2

View File

@ -218,7 +218,8 @@ class ConfigureTool(admintool.AdminTool):
if value not in value_type:
raise ValueError(
"invalid choice {0} (choose from {1})".format(
repr(value), ', '.join(repr(value_type))))
repr(value), ', '.join(
sorted(repr(v) for v in value_type))))
return value
else:
parse = value_type