image-info: fix read_partition() call

One occurrance of read_partition() call have not been modified as part of
previous commit [1], which is a bug.

[1] 598c2b6939

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-06-08 09:21:45 +02:00 committed by Ondřej Budai
parent a2d4ba715f
commit 244cb35eca

View file

@ -238,7 +238,9 @@ def read_partition_table(device):
try:
sfdisk = subprocess_check_output(["sfdisk", "--json", device], json.loads)
except subprocess.CalledProcessError:
partitions.append(read_partition(device, False))
# This handles a case, when the device does contain a filesystem,
# but there is no partition table.
partitions.append(read_partition(device, {}))
return info
ptable = sfdisk["partitiontable"]