parttool: Fix regression when parsing binary partition data

Regression in a91de43537
This commit is contained in:
Angus Gratton 2019-12-20 19:09:10 +11:00 committed by Angus Gratton
parent abe26a1c02
commit 8f15664be0

View file

@ -96,6 +96,7 @@ class ParttoolTarget():
partition_table = None
with open(partition_table_file, "rb") as f:
input_is_binary = (f.read(2) == gen.PartitionDefinition.MAGIC_BYTES)
f.seek(0)
if input_is_binary:
partition_table = gen.PartitionTable.from_binary(f.read())