]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: plugins: rawcopy: Fixed wrong variable type
authorDaniel Schultz <d.schultz@phytec.de>
Tue, 7 Mar 2017 13:41:55 +0000 (14:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Mar 2017 10:15:45 +0000 (10:15 +0000)
Without the int() function this variable will be a string. This will led
to a error in Filemap on line 545 due wrong types.

> [...]
>   File
> ".../poky/scripts/lib/wic/filemap.py", line 545, in sparse_copy
>     if start < skip < end:
> TypeError: unorderable types: int() < str()

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/plugins/source/rawcopy.py

index 12348ae35e273fb96db208c25ff279da4ab99291..bc71cf6f7632d2052458b2970dd0850be12c5bff 100644 (file)
@@ -73,7 +73,7 @@ class RawCopyPlugin(SourcePlugin):
         dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
 
         if 'skip' in source_params:
-            sparse_copy(src, dst, skip=source_params['skip'])
+            sparse_copy(src, dst, skip=int(source_params['skip']))
         else:
             sparse_copy(src, dst)