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):
