generic-poky/bitbake/lib
Ed Bartosh acb94078c4 bitbake: buildinfohelper: fix KeyError
When bitbake doesn't need to build anything it still sends
ImagePkgList event with empty 'pkgdata', 'imgdata' and 'filedata'
fields. This causes crash in buildinfohelper code as it's assumed
that above mentioned fields always have data keyed by build target:

ERROR: u'core-image-minimal'
Traceback (most recent call last):
  File "toasterui.py", line 423, in main
    buildinfohelper.store_target_package_data(event)
  File "buildinfohelper.py", line 1218, in store_target_package_data
    imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target]
KeyError: u'core-image-minimal'

Fixed this by using dict.get method with empty dictionary as default
return value instead of trying to get value without checking if target
key is in the data.

(Bitbake rev: c39cc463e6d9594bf2c5ac8bb74e834f6f2cf7c8)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 23:10:30 +01:00
..
bb bitbake: buildinfohelper: fix KeyError 2016-04-06 23:10:30 +01:00
bs4 bitbake: bs4: Add beautifulsoup 4.3.2 to assist the fetcher 2014-11-06 16:45:23 +00:00
ply Add pysh, ply, and codegen to lib/ to prepare for future work 2010-08-03 14:06:07 +01:00
prserv bitbake: prserv: Add dump_db() 2016-02-26 17:20:31 +00:00
toaster bitbake: toaster: get bitbake location from BBBASEDIR 2016-04-06 23:10:30 +01:00
codegen.py Add pysh, ply, and codegen to lib/ to prepare for future work 2010-08-03 14:06:07 +01:00
progressbar.py bitbake: progressbar: use '/usr/bin/env' in shebangs with python 2014-11-12 15:25:17 +00:00
pyinotify.py bitbake: bitbake: Add pyinotify to lib/ 2015-01-14 11:32:02 +00:00