[anaconda-storage-branch PATCH] Catch FSError when detecting storage, prevent user from continuing.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This could use expansion in the future, perhaps removing the disk
that caused the problem as a Skip option, or something like that.
For now, if we can't read your disks, stop.
---
 storage/__init__.py |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 6f181d3..365edcd 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -212,22 +212,29 @@ class Storage(object):
             if device.format.type == "luks" and device.format.exists:
                 self.__luksDevs[device.format.uuid] = device.format._LUKS__passphrase
 
-        w = self.anaconda.intf.waitWindow(_("Finding Devices"),
-                                      _("Finding storage devices..."))
-        self.iscsi.startup(self.anaconda.intf)
-        self.zfcp.startup()
-        self.devicetree = DeviceTree(intf=self.anaconda.intf,
-                                     ignored=self.ignoredDisks,
-                                     exclusive=self.exclusiveDisks,
-                                     clear=self.clearPartDisks,
-                                     reinitializeDisks=self.reinitializeDisks,
-                                     protected=self.protectedPartitions,
-                                     zeroMbr=self.zeroMbr,
-                                     passphrase=self.encryptionPassphrase,
-                                     luksDict=self.__luksDevs)
-        self.devicetree.populate()
-        self.fsset = FSSet(self.devicetree)
-        w.pop()
+        try:
+            w = self.anaconda.intf.waitWindow(_("Finding Devices"),
+                                              _("Finding storage devices..."))
+            self.iscsi.startup(self.anaconda.intf)
+            self.zfcp.startup()
+            self.devicetree = DeviceTree(intf=self.anaconda.intf,
+                                         ignored=self.ignoredDisks,
+                                         exclusive=self.exclusiveDisks,
+                                         clear=self.clearPartDisks,
+                                         reinitializeDisks=self.reinitializeDisks,
+                                         protected=self.protectedPartitions,
+                                         zeroMbr=self.zeroMbr,
+                                         passphrase=self.encryptionPassphrase,
+                                         luksDict=self.__luksDevs)
+            self.devicetree.populate()
+            self.fsset = FSSet(self.devicetree)
+            w.pop()
+        except FSError as e:
+            w.pop()
+            self.anaconda.intf.messageWindow(_("Error"),
+                _("Filesystem error detected, cannot continue."),
+                custom_icon="error")
+            sys.exit(0)
 
     @property
     def devices(self):
-- 
1.6.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux