--- platform.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/platform.py b/platform.py index 2a4b9ea..7b1ff1f 100644 --- a/platform.py +++ b/platform.py @@ -220,6 +220,12 @@ class EFI(Platform): if req.format.type != "efi": errors.append(_("/boot/efi is not EFI."))
+ disk = req.disk.format.partedDisk + + # Check that we've got a correct disk label. + if not disk.type in [parted.diskType["gpt"].name, parted.diskType["msdos"].name]: + errors.append(_("%s must have a GPT or MSDOS disk label.") % req.disk.name) + return errors
def setDefaultPartitioning(self):
On Tue, 2009-11-24 at 11:13 -0500, Chris Lumens wrote:
platform.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/platform.py b/platform.py index 2a4b9ea..7b1ff1f 100644 --- a/platform.py +++ b/platform.py @@ -220,6 +220,12 @@ class EFI(Platform): if req.format.type != "efi": errors.append(_("/boot/efi is not EFI."))
disk = req.disk.format.partedDisk
# Check that we've got a correct disk label.
if not disk.type in [parted.diskType["gpt"].name, parted.diskType["msdos"].name]:
errors.append(_("%s must have a GPT or MSDOS disk label.") % req.disk.name)
Why not just this instead:
if not disk.type in ["gpt", "msdos"]:
Otherwise it looks fine.
Dave
return errors
def setDefaultPartitioning(self):
# Check that we've got a correct disk label.
if not disk.type in [parted.diskType["gpt"].name, parted.diskType["msdos"].name]:
errors.append(_("%s must have a GPT or MSDOS disk label.") % req.disk.name)
Why not just this instead:
if not disk.type in ["gpt", "msdos"]:
Yeah that does look less silly. I was thinking the disk label names might not match the parted.diskType keys, but a quick check shows that's not the case. I'll change it.
- Chris
anaconda-devel@lists.stg.fedoraproject.org