]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: rawcopy: ensure comparison is done on int
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Tue, 7 Apr 2015 10:21:58 +0000 (12:21 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Apr 2015 22:11:07 +0000 (23:11 +0100)
The size comparison may fail because it is done on strings rather than
integers.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/plugins/source/rawcopy.py

index 6bdd9b21cea23cf5b46af471d316cbc05a26cc3e..ca6b721b670ff74fe4eac580200837d1412c766e 100644 (file)
@@ -76,7 +76,7 @@ class RawCopyPlugin(SourcePlugin):
         out = exec_cmd(du_cmd)
         filesize = out.split()[0]
 
-        if filesize > part.size:
+        if int(filesize) > int(part.size):
             part.size = filesize
 
         part.source_file = dst