mirror of https://git.48k.eu/ogclient
disk: use cxt.label.name to dtect disk type in get_efi_partition
Use cxt.label.name instead of cxt.label to identify if the disk is GPT or MBR. This way is more used in other parts of the codebase.master
parent
b3659a30fc
commit
2fcdf89606
|
@ -105,7 +105,7 @@ def get_efi_partition(disknum, enforce_gpt):
|
|||
disk = get_disks()[disk_index]
|
||||
cxt = fdisk.Context(f'/dev/{disk}')
|
||||
|
||||
if enforce_gpt and cxt.label == fdisk.FDISK_DISKLABEL_DOS:
|
||||
if enforce_gpt and cxt.label.name == 'dos':
|
||||
raise OgError(f'Windows EFI partition requires GPT partition scheme, but /dev/{disk} has DOS partition scheme')
|
||||
|
||||
logging.info('Searching EFI partition...')
|
||||
|
|
Loading…
Reference in New Issue