tools/image-info: consistent use of - over _
And remove a stray comment and whitespace.
This commit is contained in:
parent
e43955a4c5
commit
9867846ff4
1 changed files with 2 additions and 5 deletions
|
|
@ -91,17 +91,14 @@ report = {}
|
|||
with nbd_connect(image) as device:
|
||||
report["image-format"] = read_image_format(image)
|
||||
report["bootloader"] = read_bootloader_type(device)
|
||||
report["partition_table"], report["partitions"] = read_partition_table(device)
|
||||
report["partition-table"], report["partitions"] = read_partition_table(device)
|
||||
|
||||
n_partitions = len(report["partitions"])
|
||||
|
||||
|
||||
for n in range(1, n_partitions + 1):
|
||||
with mount(device + f"p{n}") as tree:
|
||||
# subprocess.run(["ls", "-l", tree])
|
||||
if os.path.exists(f"{tree}/etc/os-release"):
|
||||
report["packages"] = sorted(subprocess_check_output(["rpm", "--root", tree, "-qa"], str.split))
|
||||
report["os_release"] = read_os_release(tree)
|
||||
report["os-release"] = read_os_release(tree)
|
||||
|
||||
with open(f"{tree}/etc/fstab") as f:
|
||||
report["fstab"] = sorted([line.split() for line in f.read().split("\n") if line and not line.startswith("#")])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue