summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-12-22 17:02:58 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-22 16:44:03 +0000
commit95d33e90f2d5d9dd5ccc950856b8a939fefb831e (patch)
tree443009407ceb1e8a8b9127f44b406b2e0c40cb0e /scripts/lib
parent30c4cd9efdac400d713dff645f23f2627277d75a (diff)
downloadopenembedded-core-95d33e90f2d5d9dd5ccc950856b8a939fefb831e.tar.gz
openembedded-core-95d33e90f2d5d9dd5ccc950856b8a939fefb831e.tar.bz2
openembedded-core-95d33e90f2d5d9dd5ccc950856b8a939fefb831e.zip
recipetool: create: minor fix for potential issue in python handling
If SRC_URI happened not to be in the pre-generated lines then this code would error out. This is unlikely to happen with the way the create code is structured at the moment, but handle it just in case. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/recipetool/create_buildsys_python.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index e0af2a0f51..266c423547 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -278,7 +278,10 @@ class PythonRecipeHandler(RecipeHandler):
for k in sorted(bbinfo):
v = bbinfo[k]
mdinfo.append('{} = "{}"'.format(k, v))
- lines_before[src_uri_line-1:src_uri_line-1] = mdinfo
+ if src_uri_line:
+ lines_before[src_uri_line-1:src_uri_line-1] = mdinfo
+ else:
+ lines_before.extend(mdinfo)
mapped_deps, unmapped_deps = self.scan_setup_python_deps(srctree, setup_info, setup_non_literals)