[PATCH] When lookup a PartedDevice also check for _ped.DeviceException (#527699)

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

 



The machine in #527699 has one seriously broken disk, this causes
(py)parted to throw a different exception type when looking up the device
this patch catches this exception too (which will result in the disk
being handled as a removeable disk (ie cardreader) with no media present,
causing us to ignore it.
---
 storage/devices.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index c0d8197..4fb1158 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -477,7 +477,7 @@ class StorageDevice(Device):
             # to find a device.
             try:
                 self._partedDevice = parted.Device(path=self.path)
-            except _ped.IOException:
+            except (_ped.IOException, _ped.DeviceException):
                 pass
 
         return self._partedDevice
-- 
1.6.5.rc2

_______________________________________________
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