URL: https://github.com/freeipa/freeipa/pull/1622
Author: rcritten
 Title: #1622: Don't return None on mismatched interactive passwords
Action: opened

PR body:
"""
This will cause the command to continue with no password set
at all which is not what we want.

We want to loop forever until the passwords match or the
user gives up and types ^D or ^C.

https://pagure.io/freeipa/issue/7383

Signed-off-by: Rob Crittenden <rcrit...@redhat.com>

Note that automated testing of this is difficult to impossible because the 
client code detects when data is being passed in via a pipe. so we can't pass 
in the mismatch passwords via stdin_text, it would have to be some much more 
complicated I fear.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1622/head:pr1622
git checkout pr1622
From aa60de788880df0bd01ac7c2152b41ffcb5eb123 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Thu, 22 Feb 2018 13:49:43 -0500
Subject: [PATCH] Don't return None on mismatched interactive passwords

This will cause the command to continue with no password set
at all which is not what we want.

We want to loop forever until the passwords match or the
user gives up and types ^D or ^C.

https://pagure.io/freeipa/issue/7383

Signed-off-by: Rob Crittenden <rcrit...@redhat.com>
---
 ipalib/cli.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ipalib/cli.py b/ipalib/cli.py
index 2da641046f..3fde581974 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -627,7 +627,6 @@ def prompt_password(self, label, confirm=True):
                     return pw1
                 else:
                     self.print_error(_('Passwords do not match!'))
-                    return None
         else:
             return self.decode(sys.stdin.readline().strip())
 
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to