From 86556a2bfa23ba69fea2ade14599054b186150cd Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Thu, 26 Apr 2012 23:34:58 -0500 Subject: base.bbclass: use isinstance for base_eventhandler Signed-off-by: Christopher Larson --- meta/classes/base.bbclass | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'meta/classes') diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 07ef9a231..bb39b7b0b 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -248,12 +248,13 @@ def buildcfg_neededvars(d): addhandler base_eventhandler python base_eventhandler() { - from bb.event import getName - - name = getName(e) - - if name.startswith("BuildStarted"): + if isinstance(e, bb.event.ConfigParsed): e.data.setVar('BB_VERSION', bb.__version__) + generate_git_config(e) + pkgarch_mapping(e.data) + preferred_ml_updates(e.data) + + if isinstance(e, bb.event.BuildStarted): statuslines = [] for func in oe.data.typed_value('BUILDCFG_FUNCS', e.data): g = globals() @@ -266,11 +267,6 @@ python base_eventhandler() { statusheader = e.data.getVar('BUILDCFG_HEADER', True) bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines))) - - if name == "ConfigParsed": - generate_git_config(e) - pkgarch_mapping(e.data) - preferred_ml_updates(e.data) } addtask configure after do_patch -- cgit v1.2.3