mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
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>
This commit is contained in:
parent
42561c3a65
commit
c2e36cda11
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue
Block a user