From 9867846ff42c03f659a6c5c8fc0aaa656a6c39e5 Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Mon, 30 Sep 2019 15:23:32 +0200 Subject: [PATCH] tools/image-info: consistent use of `-` over `_` And remove a stray comment and whitespace. --- tools/image-info | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/image-info b/tools/image-info index 7484b7d54..36282cfa3 100755 --- a/tools/image-info +++ b/tools/image-info @@ -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("#")])