[PATCH 3/3] Raise a more descriptive exception for corrupt gpt disklabels.
Anne Mulhern
amulhern at redhat.com
Tue Jan 20 19:59:49 UTC 2015
----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Tuesday, January 20, 2015 2:54:00 PM
> Subject: [PATCH 3/3] Raise a more descriptive exception for corrupt gpt disklabels.
>
> 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
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
Ack.
- mulhern
More information about the anaconda-patches
mailing list