[master 1/1] Catch blivet formatDevice ValueError in custom (#1240226)
bcl
installerbot-noreply at redhat.com
Wed Jul 8 17:39:22 UTC 2015
From: "Brian C. Lane" <bcl at 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/08c7ded781b0852b5c5ae822bf09374a96b290ad
More information about the anaconda-patches
mailing list