summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/rawcopy.py
diff options
context:
space:
mode:
authorMaciej Borzecki <maciej.borzecki@rndity.com>2016-11-10 13:18:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-15 15:19:55 +0000
commitf0181e79eda9102e11ae1ec3e4939ac5fc02cb13 (patch)
treef89783b7ca2f6120a84f1e2f138c858613511b29 /scripts/lib/wic/plugins/source/rawcopy.py
parent81afedc905280f4bfc5fd5f2806a0c6baf657055 (diff)
downloadpoky-f0181e79eda9102e11ae1ec3e4939ac5fc02cb13.tar.gz
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 <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugins/source/rawcopy.py')
-rw-r--r--scripts/lib/wic/plugins/source/rawcopy.py4
1 files changed, 2 insertions, 2 deletions
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):
78 # get the size in the right units for kickstart (kB) 78 # get the size in the right units for kickstart (kB)
79 du_cmd = "du -Lbks %s" % dst 79 du_cmd = "du -Lbks %s" % dst
80 out = exec_cmd(du_cmd) 80 out = exec_cmd(du_cmd)
81 filesize = out.split()[0] 81 filesize = int(out.split()[0])
82 82
83 if int(filesize) > int(part.size): 83 if filesize > part.size:
84 part.size = filesize 84 part.size = filesize
85 85
86 part.source_file = dst 86 part.source_file = dst