diff mbox series

[wic] wic: partition.py: fix output if mountpoint unset

Message ID 20260714213940.1630619-1-gael.portay+rtone@gmail.com
State New
Headers show
Series [wic] wic: partition.py: fix output if mountpoint unset | expand

Commit Message

Gaël PORTAY July 14, 2026, 9:39 p.m. UTC
Set the partition number when handling partition with mountpoint unset
in order for the debug log line to correctly identify the partition.

Fixes:

	wic.WicError: File system image of partition None is larger (70993 kB + 0 kB extra part space) than its allowed size 65536 kB

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
---
 src/wic/partition.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/wic/partition.py b/src/wic/partition.py
index 435d31d..8239dd4 100644
--- a/src/wic/partition.py
+++ b/src/wic/partition.py
@@ -267,7 +267,7 @@  class Partition():
         if self.fixed_size and self.size + self.extra_partition_space > self.fixed_size:
             raise WicError("File system image of partition %s is "
                            "larger (%d kB + %d kB extra part space) than its allowed size %d kB" %
-                           (self.mountpoint, self.size, self.extra_partition_space, self.fixed_size))
+                           (self.mountpoint or self.lineno, self.size, self.extra_partition_space, self.fixed_size))
 
     def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
                        native_sysroot, real_rootfs = True, pseudo_dir = None):