[PATCH 1/2] Check passphrase unless explicit cancel (#821724)

Jesse Keating jkeating at redhat.com
Fri Jul 6 16:35:07 UTC 2012


snack/newt returns None for a button if F12 is pressed which is a global
default.  There can be passphrase data in the box when this happens and
we should read it.  The only time we should ignore anything in the box
is if the user has explicitely pressed the cancel button.  If the
passphrase box is empty but the user pressed F12 we still handle that
correctly as an implicit cancel.
---
 pyanaconda/text.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyanaconda/text.py b/pyanaconda/text.py
index 1b201c1..c397d9e 100644
--- a/pyanaconda/text.py
+++ b/pyanaconda/text.py
@@ -241,7 +241,7 @@ class PassphraseEntryWindow:
         res = buttons.buttonPressed(rc)
 
         passphrase = None
-        if res == TEXT_OK_CHECK:
+        if res == TEXT_OK_CHECK or rc == "F12":
             passphrase = passphraseentry.value().strip()
 
         self.rc = passphrase
-- 
1.7.10.4



More information about the anaconda-patches mailing list