From f0181e79eda9102e11ae1ec3e4939ac5fc02cb13 Mon Sep 17 00:00:00 2001 From: Maciej Borzecki Date: Thu, 10 Nov 2016 13:18:32 +0100 Subject: wic: make sure that partition size is always an integer in internal processing The size field of Partition class is expected to be an integer and ought to be set inside prepare_*() method. Make sure that this is always the case. (From OE-Core rev: a37838f995ae642b0b8bdd47a605a264fb3bf200) Signed-off-by: Maciej Borzecki Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- scripts/lib/wic/plugins/source/rawcopy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/lib/wic/plugins/source/rawcopy.py') diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py index e0b11f95ad..5bd22fdeb5 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py @@ -78,9 +78,9 @@ class RawCopyPlugin(SourcePlugin): # get the size in the right units for kickstart (kB) du_cmd = "du -Lbks %s" % dst out = exec_cmd(du_cmd) - filesize = out.split()[0] + filesize = int(out.split()[0]) - if int(filesize) > int(part.size): + if filesize > part.size: part.size = filesize part.source_file = dst -- cgit v1.2.3-54-g00ecf