partition_table: Fix missing argument not present for all parsers

This commit is contained in:
Roland Dobai 2020-11-25 19:30:44 +01:00
parent 0a933f66e3
commit 075d3a57ac

View File

@ -294,7 +294,7 @@ def main():
elif args.partition_type:
if not args.partition_subtype:
raise RuntimeError("--partition-subtype should be defined when --partition-type is defined")
partition_id = PartitionType(args.partition_type, args.partition_subtype, args.part_list)
partition_id = PartitionType(args.partition_type, args.partition_subtype, getattr(args, 'part_list', None))
elif args.partition_boot_default:
partition_id = PARTITION_BOOT_DEFAULT
else: