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("")