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 authored and Martin Basti committed 2015-11-11 10:43:52 +01:00
1 parent 9f3e8943a7
commit b6a2a1cfd2
1 file changed
+2 -1
+2 -1
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