[PATCH] Don't traceback on CD-ROM driver in list-harddrives-stub (#586410).

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

 



---
 command-stubs/list-harddrives-stub |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/command-stubs/list-harddrives-stub b/command-stubs/list-harddrives-stub
index e854d6c..484428d 100755
--- a/command-stubs/list-harddrives-stub
+++ b/command-stubs/list-harddrives-stub
@@ -20,12 +20,16 @@
 
 import sys
 import parted
+import _ped
 
 def main(argv):
     lst = set()
 
     for dev in filter(lambda d: d.type != parted.DEVICE_DM, parted.getAllDevices()):
-        disk = parted.Disk(dev)
+        try:
+            disk = parted.Disk(dev)
+        except _ped.DiskLabelException:
+            continue
 
         for part in disk.partitions:
             lst.add("%s %s" % (part.path, int(part.getSize())))
-- 
1.7.0.1

_______________________________________________
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