summaryrefslogtreecommitdiffstats
path: root/partIntfHelpers.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-06-25 05:19:07 +0000
committerMike Fulbright <msf@redhat.com>2002-06-25 05:19:07 +0000
commit843a5c40fdf82a09547de6a669ab2a0f149f9fb3 (patch)
tree31a73944f747d76587fe9a7fc1c6189b017fb13c /partIntfHelpers.py
parentf79ccca82d3a7cbe181ee44b4378527f746d7d76 (diff)
downloadanaconda-843a5c40fdf82a09547de6a669ab2a0f149f9fb3.tar.gz
anaconda-843a5c40fdf82a09547de6a669ab2a0f149f9fb3.tar.xz
anaconda-843a5c40fdf82a09547de6a669ab2a0f149f9fb3.zip
make error messages on trying to act on members of a VG or RAID device more meaningful
Diffstat (limited to 'partIntfHelpers.py')
-rw-r--r--partIntfHelpers.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/partIntfHelpers.py b/partIntfHelpers.py
index 99def4003..aec10fe8c 100644
--- a/partIntfHelpers.py
+++ b/partIntfHelpers.py
@@ -104,12 +104,22 @@ def isNotChangable(request, requestlist):
"for the hard drive install.")
if requestlist.isRaidMember(request):
- return _("You cannot %s this partition as it is part of "
- "a RAID device")
+ parentreq = requestlist.getRaidMemberParent(request)
+ if parentreq.raidminor is not None:
+ return _("You cannot %%s this partition as it is part of "
+ "the RAID device /dev/md%s.") % (parentreq.raidminor,)
+ else:
+ return _("You cannot %s this partition as it is part of a "
+ "RAID device.")
if requestlist.isLVMVolumeGroupMember(request):
- return _("You cannot %s this partition, as it is part of a LVM "
- "volume group.")
+ parentreq = requestlist.getLVMVolumeGroupMemberParent(request)
+ if parentreq.volumeGroupName is not None:
+ return _("You cannot %%s this partition, as it is part of the "
+ "LVM volume group '%s'.") % (parentreq.volumeGroupName,)
+ else:
+ return _("You cannot %s this partition, as it is part of a "
+ "LVM volume group.")
return None