On 11/09/2015 07:15 AM, Jan Cholasta wrote:
On 6.11.2015 17:02, Martin Babinsky wrote:
On 11/06/2015 10:30 AM, Martin Babinsky wrote:
https://fedorahosted.org/freeipa/ticket/5433




Attaching updated patch.

NACK, the first patch was better, there should be quotes around the values.


Attaching updated patch.

--
Martin^3 Babinsky
From 9a4b22231a8ed8aaaceb43bf26e800c63bebc91a Mon Sep 17 00:00:00 2001
From: Martin Babinsky <mbabi...@redhat.com>
Date: Fri, 6 Nov 2015 10:05:42 +0100
Subject: [PATCH] fix error reporting when installer option is supplied with
 invalid choice

https://fedorahosted.org/freeipa/ticket/5433
---
 ipapython/install/cli.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py
index d2250e51650b9de1c85473399e3462f42bf8770b..aed0bc9fe12e0c56987a4e2f78d73f476dcfc2c8 100644
--- a/ipapython/install/cli.py
+++ b/ipapython/install/cli.py
@@ -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
-- 
2.4.3

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to