Skip to content
Commit a74e30a4 authored by Peter Bergin's avatar Peter Bergin Committed by Richard Purdie
Browse files

buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variable



An exception is fired when a BuildStarted event is sent to buildhistory bbclass
and the variable BUILDHISTORY_FEATURES is not set.

    ERROR: Execution of event handler 'buildhistory_eventhandler' failed
    Traceback (most recent call last):
      File "<...>/meta/classes/buildhistory.bbclass", line 862, in buildhistory_eventhandler(e=<bb.event.BuildStarted object at 0x7f94c3810250>):
         python buildhistory_eventhandler() {
        >    if e.data.getVar('BUILDHISTORY_FEATURES').strip():
                 reset = e.data.getVar("BUILDHISTORY_RESET")
    AttributeError: 'NoneType' object has no attribute 'strip'

This can happen in a multiconfig build where the default configuration use the
buildhistory class but not the configuration in mc. It should be a rare case that
this happens and it was found in a missconfigured build.

Signed-off-by: default avatarPeter Bergin <peter@berginkonsult.se>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent 32007e42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment