aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/update.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-08-11 11:05:16 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-05 00:31:23 +0100
commitc2e36cda119313c121cf81cb1d98591a0a88ee4a (patch)
treeff98a9f7703a76b198dffbe2f24cab7e58892441 /layerindex/update.py
parent42561c3a6580f694429593f409464564d3011d0d (diff)
downloadopenembedded-core-contrib-c2e36cda119313c121cf81cb1d98591a0a88ee4a.tar.gz
openembedded-core-contrib-c2e36cda119313c121cf81cb1d98591a0a88ee4a.tar.bz2
openembedded-core-contrib-c2e36cda119313c121cf81cb1d98591a0a88ee4a.zip
update.py: handle if deleted recipe can't be found
Show a warning instead of a traceback if a deleted recipe can't be found in the database. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-xlayerindex/update.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/layerindex/update.py b/layerindex/update.py
index 5da061ad38..096c23e8b5 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -356,9 +356,12 @@ def main():
(typename, filepath, filename) = recipeparse.detect_file_type(path, subdir_start)
if typename == 'recipe':
values = layerrecipes.filter(filepath=filepath).filter(filename=filename).values('id', 'filepath', 'filename', 'pn')
- layerrecipes_delete.append(values[0])
- logger.debug("Mark %s for deletion" % values[0])
- updatedrecipes.add(os.path.join(values[0]['filepath'], values[0]['filename']))
+ if len(values):
+ layerrecipes_delete.append(values[0])
+ logger.debug("Mark %s for deletion" % values[0])
+ updatedrecipes.add(os.path.join(values[0]['filepath'], values[0]['filename']))
+ else:
+ logger.warn("Deleted recipe %s could not be found" % path)
elif typename == 'bbappend':
layerappends.filter(filepath=filepath).filter(filename=filename).delete()
elif typename == 'machine':