wic: Fix error message when reporting invalid offset
PATCH 1/1 wic: Fix error message when reporting invalid offset
The error message was reporting the calculated offset instead of the current offset, which made it confusing.
Signed-off-by Joshua Watt <[email protected]>
--- scripts/lib/wic/plugins/imager/direct.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/wic/plugins/imager/direct.py +1 -1
@@ -436,7 +436,7 @@ class PartitionedImage(): delta = offset - self.offset if delta < 0: - raise WicError("Could not place %s%s at offset %dK: next free sector is %d (delta: %d)" % (part.disk, self.numpart, part.offset, offset, delta)) + raise WicError("Could not place %s%s at offset %dK: next free sector is %d (delta: %d)" % (part.disk, self.numpart, part.offset, self.offset, delta)) logger.debug("Skipping %d sectors to place %s%s at offset %dK", delta, part.disk, self.numpart, part.offset)
Signature · 1 line
2.26.2