File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -706,7 +706,7 @@ def partition(
706
706
if partition_table is None :
707
707
raise ValueError ('Modification is marked as wipe but no partitioning table was provided' )
708
708
709
- if partition_table .MBR and len (modification .partitions ) > 3 :
709
+ if partition_table .is_mbr () and len (modification .partitions ) > 3 :
710
710
raise DiskError ('Too many partitions on disk, MBR disks can only have 3 primary partitions' )
711
711
712
712
# WARNING: the entire device will be wiped and all data lost
Original file line number Diff line number Diff line change @@ -202,6 +202,9 @@ class PartitionTable(Enum):
202
202
GPT = 'gpt'
203
203
MBR = 'msdos'
204
204
205
+ def is_mbr (self ) -> bool :
206
+ return self == PartitionTable .MBR
207
+
205
208
206
209
class Units (Enum ):
207
210
BINARY = 'binary'
You can’t perform that action at this time.
0 commit comments