Bug 10186 - Typo in adding an event handler leads to confusing error
Summary: Typo in adding an event handler leads to confusing error
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.2 M4
Assignee: Markus Lehtonen
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-08-24 22:35 UTC by Mark Hatle
Modified: 2016-09-07 07:49 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2016-08-24 22:35:17 UTC
Create a class that looks like:

addhandler my_test_handler


Include the class, and the following error occurs:

ERROR: Error parsing configuration files
Traceback (most recent call last):
  File "/home/mhatle/git/oss/oe-core/bitbake/lib/bb/cookerdata.py", line 265, in CookerDataBuilder.parseBaseConfiguration():
                 bb.parse.init_parser(self.basedata)
    >            self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
     
  File "/home/mhatle/git/oss/oe-core/bitbake/lib/bb/cookerdata.py", line 360, in CookerDataBuilder.parseConfigurationFiles(prefiles=[], postfiles=[]):
                 handlerfn = data.getVarFlag(var, "filename", False)
    >            handlerln = int(data.getVarFlag(var, "lineno", False))
                 bb.event.register(var, data.getVar(var, False),  (data.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'


It would be better if bitbake reported "unable to find event handler 'my_test_handler'" or something like that.
Comment 1 Markus Lehtonen 2016-08-30 09:54:36 UTC
Patch sent for review:
https://patchwork.openembedded.org/patch/130609/