[oe-commits] Alexandre Belloni : wic: rawcopy: ensure comparison is done on int
git at git.openembedded.org
git at git.openembedded.org
Thu Apr 9 10:29:04 UTC 2015
Module: openembedded-core.git
Branch: master
Commit: 2ef885329cfd0351f551a33dcf3f42e25f38dea7
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=2ef885329cfd0351f551a33dcf3f42e25f38dea7
Author: Alexandre Belloni <alexandre.belloni at free-electrons.com>
Date: Tue Apr 7 12:21:58 2015 +0200
wic: rawcopy: ensure comparison is done on int
The size comparison may fail because it is done on strings rather than
integers.
Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/wic/plugins/source/rawcopy.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index 6bdd9b2..ca6b721 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -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
More information about the Openembedded-commits
mailing list