Skip to content

Commit b83bc79

Browse files
authored
Fix MBR conditional (#3192)
1 parent c364917 commit b83bc79

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

archinstall/lib/disk/device_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ def partition(
706706
if partition_table is None:
707707
raise ValueError('Modification is marked as wipe but no partitioning table was provided')
708708

709-
if partition_table.MBR and len(modification.partitions) > 3:
709+
if partition_table.is_mbr() and len(modification.partitions) > 3:
710710
raise DiskError('Too many partitions on disk, MBR disks can only have 3 primary partitions')
711711

712712
# WARNING: the entire device will be wiped and all data lost

archinstall/lib/models/device_model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ class PartitionTable(Enum):
202202
GPT = 'gpt'
203203
MBR = 'msdos'
204204

205+
def is_mbr(self) -> bool:
206+
return self == PartitionTable.MBR
207+
205208

206209
class Units(Enum):
207210
BINARY = 'binary'

0 commit comments

Comments
 (0)