diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-08-30 12:53:30 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-02 16:29:36 +0100 |
commit | 107c47c4e6de6a596cf1aeca5c18dbc1c5b44dc4 (patch) | |
tree | 90c75813eae0714c52731e5d86670f3fbfb17ea9 /lib/bb/cookerdata.py | |
parent | a9041fc96a14e718c0c1d1676e705343b9e872d3 (diff) | |
download | bitbake-contrib-107c47c4e6de6a596cf1aeca5c18dbc1c5b44dc4.tar.gz |
cookerdata/ast: Fail gracefully if event handler function is not found
[YOCTO #10186]
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cookerdata.py')
-rw-r--r-- | lib/bb/cookerdata.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py index fa1de7a22..bf9bfbf93 100644 --- a/lib/bb/cookerdata.py +++ b/lib/bb/cookerdata.py @@ -357,6 +357,9 @@ class CookerDataBuilder(object): # We register any handlers we've found so far here... for var in data.getVar('__BBHANDLERS', False) or []: handlerfn = data.getVarFlag(var, "filename", False) + if not handlerfn: + parselog.critical("Undefined event handler function '%s'" % var) + sys.exit(1) handlerln = int(data.getVarFlag(var, "lineno", False)) bb.event.register(var, data.getVar(var, False), (data.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln) |