Hello,

Fix for https://fedorahosted.org/freeipa/ticket/5355

Thanks,

Gabe
From 02434fc8467bbc81313d4bda0cf0e9644c151f00 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Tue, 27 Oct 2015 19:17:43 -0600
Subject: [PATCH] interactive installer does not ignore leading/trailing
 whitespace

https://fedorahosted.org/freeipa/ticket/5355
---
 ipapython/ipautil.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py
index b6fd11338f5f55402d5e4502297866f3b0cc0534..34ff339800d56673f3438a3495cdf4f54d5563d3 100644
--- a/ipapython/ipautil.py
+++ b/ipapython/ipautil.py
@@ -763,7 +763,7 @@ def user_input(prompt, default = None, allow_empty = True):
             try:
                 ret = input("%s: " % prompt)
                 if allow_empty or ret.strip():
-                    return ret
+                    return ret.strip()
             except EOFError:
                 if allow_empty:
                     return ''
@@ -776,7 +776,7 @@ def user_input(prompt, default = None, allow_empty = True):
                 if not ret and (allow_empty or default):
                     return default
                 elif ret.strip():
-                    return ret
+                    return ret.strip()
             except EOFError:
                 return default
 
-- 
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