[PATCH] Show errors from the displayed mountpoint when exiting the custom spoke

David Shea dshea at redhat.com
Tue May 20 15:47:35 UTC 2014


In on_back_clicked, check for and fail on errors set by _save_right_side
instead of just silently undoing the changes.
---
 pyanaconda/ui/gui/spokes/custom.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index c732e04..328cf61 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1471,7 +1471,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         return self._error == ""
 
     def on_back_clicked(self, button):
-        # First, save anything from the currently displayed mountpoint.
+        # Clear any existing errors
+        self.clear_errors()
+
+        # Save anything from the currently displayed mountpoint.
         self._save_right_side(self._current_selector)
 
         # And then display the summary screen.  From there, the user will either
@@ -1485,6 +1488,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         if not self._back_already_clicked:
             self._back_already_clicked = True
 
+            # If we hit any errors while saving things above, stop and let the
+            # user think about what they have done
+            if self._error is not None:
+                return
+
             new_luks = [d for d in self._storage_playground.devices
                        if d.format.type == "luks" and not d.format.exists]
             if new_luks:
-- 
1.9.0



More information about the anaconda-patches mailing list