[PATCH 02/19] Set up devices before trying to decrypt them. (#865247, #867533)
David Lehman
dlehman at redhat.com
Thu Oct 18 21:49:30 UTC 2012
This also expands the set of exceptions handled when testing the
passphrase, which catches the case of an empty passphrase.
---
pyanaconda/ui/gui/spokes/custom.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index b390f9a..c798aed 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1975,9 +1975,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
passphrase = entry.get_text()
device.format.passphrase = passphrase
try:
+ device.setup()
device.format.setup()
- except CryptoError as e:
+ except StorageError as e:
log.error("failed to unlock %s: %s" % (device.name, e))
+ device.teardown(recursive=True)
self._error = e
device.format.passphrase = None
entry.set_text("")
--
1.7.7.6
More information about the anaconda-patches
mailing list