[PATCH 3/3] Raise a more descriptive exception for corrupt gpt disklabels.
David Lehman
dlehman at redhat.com
Tue Jan 20 19:54:00 UTC 2015
Related: rhbz#1123450
---
blivet/devicetree.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index ea82645..5046413 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -947,7 +947,12 @@ class DeviceTree(object):
disk.format.type != "iso9660" and \
not disk.format.hidden and \
not self._isIgnoredDisk(disk):
- raise DeviceTreeError("failed to scan disk %s" % disk.name)
+ if info.get("ID_PART_TABLE_TYPE") == "gpt":
+ msg = "corrupt gpt disklabel on disk %s" % disk.name
+ else:
+ msg = "failed to scan disk %s" % disk.name
+
+ raise DeviceTreeError(msg)
# there's no need to filter partitions on members of multipaths or
# fwraid members from lvm since multipath and dmraid are already
--
1.9.3
More information about the anaconda-patches
mailing list