diff options
author | Chris Lumens <clumens@redhat.com> | 2009-03-05 15:07:12 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-03-05 15:07:12 -0500 |
commit | 83fef98ba14c5c1f6a138f47cf964ea24033d877 (patch) | |
tree | b01e4fcc6a9bbb0f9677b5d796c2f677125d2152 | |
parent | 4016d43f98cb3be04478a051233172a9ea706161 (diff) | |
download | anaconda-83fef98ba14c5c1f6a138f47cf964ea24033d877.tar.gz anaconda-83fef98ba14c5c1f6a138f47cf964ea24033d877.tar.xz anaconda-83fef98ba14c5c1f6a138f47cf964ea24033d877.zip |
Do an even more thorough job of ignoring disks libparted doesn't like.
Sometimes, libparted CAN probe /dev/sr0. In those cases, we fail to make
a parted.Disk for it becuase there's obviously no disk label on a CD-ROM.
For now we'll just handle all possible tracebacks. Later, we will want to
do a better job of filtering out exceptions and possibly prompt for
initializing disks.
-rw-r--r-- | storage/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/__init__.py b/storage/__init__.py index 6098759f2..c59b3bbee 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -385,10 +385,10 @@ class Storage(object): try: dev = parted.Device(path=device.path) - except parted.DeviceException: + disk = parted.Disk(device=dev) + except: continue - disk = parted.Disk(device=dev) for part in disk.partitions: if part.active and \ not part.getFlag(parted.PARTITION_RAID) and \ |