summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cookerdata.py3
-rw-r--r--bitbake/lib/bb/parse/ast.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index fa1de7a22f..bf9bfbf931 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -357,6 +357,9 @@ class CookerDataBuilder(object):
357 # We register any handlers we've found so far here... 357 # We register any handlers we've found so far here...
358 for var in data.getVar('__BBHANDLERS', False) or []: 358 for var in data.getVar('__BBHANDLERS', False) or []:
359 handlerfn = data.getVarFlag(var, "filename", False) 359 handlerfn = data.getVarFlag(var, "filename", False)
360 if not handlerfn:
361 parselog.critical("Undefined event handler function '%s'" % var)
362 sys.exit(1)
360 handlerln = int(data.getVarFlag(var, "lineno", False)) 363 handlerln = int(data.getVarFlag(var, "lineno", False))
361 bb.event.register(var, data.getVar(var, False), (data.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln) 364 bb.event.register(var, data.getVar(var, False), (data.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln)
362 365
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index d7185b1664..fa83b18981 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -344,6 +344,8 @@ def finalize(fn, d, variant = None):
344 for var in d.getVar('__BBHANDLERS', False) or []: 344 for var in d.getVar('__BBHANDLERS', False) or []:
345 # try to add the handler 345 # try to add the handler
346 handlerfn = d.getVarFlag(var, "filename", False) 346 handlerfn = d.getVarFlag(var, "filename", False)
347 if not handlerfn:
348 bb.fatal("Undefined event handler function '%s'" % var)
347 handlerln = int(d.getVarFlag(var, "lineno", False)) 349 handlerln = int(d.getVarFlag(var, "lineno", False))
348 bb.event.register(var, d.getVar(var, False), (d.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln) 350 bb.event.register(var, d.getVar(var, False), (d.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln)
349 351