]> code.ossystems Code Review - openembedded-core.git/commit
lib/oe/recipeutils: fix patch_recipe*() with empty input
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 25 Jul 2016 08:47:17 +0000 (20:47 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Jul 2016 22:47:03 +0000 (23:47 +0100)
commit92a73e870478ddb2a2d137e3fff28828809bec2e
tree27e47153e1ecba4dc54e26b167e2e01666a5b4e4
parent7340c1ea677731d21351d47d935d9de7d7e2eda5
lib/oe/recipeutils: fix patch_recipe*() with empty input

If you supplied an empty file to patch_recipe() (or an empty list to
patch_recipe_lines()) then the result was IndexError because the code
checking to see if it needed to add an extra line of padding didn't
check to see if there were in fact any lines before trying to access the
last line.

Fixes [YOCTO #9972].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/recipeutils.py