From: "Brian C. Lane" <bcl(a)redhat.com>
Trying to format when formatting isn't possible, eg. NTFS as /, raises
ValueError so catch that and pass it on to the user.
---
pyanaconda/ui/gui/spokes/custom.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 0520d13..6596336 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -851,7 +851,7 @@ def _do_reformat(self, device, mountpoint, label, changed_encryption,
device=device.path)
try:
self._storage_playground.formatDevice(device, new_format)
- except StorageError as e:
+ except (StorageError, ValueError) as e:
log.error("failed to register device format action: %s", e)
device.format = old_format
self._error = e
--
To view this commit on github, visit
https://github.com/rhinstaller/anaconda/commit/08c7ded781b0852b5c5ae822bf...