diff options
-rw-r--r-- | lib/bb/event.py | 7 | ||||
-rw-r--r-- | lib/bb/parse/parse_py/BBHandler.py | 2 | ||||
-rw-r--r-- | lib/bb/ui/knotty.py | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py index 8f0a1961d..86b566feb 100644 --- a/lib/bb/event.py +++ b/lib/bb/event.py @@ -125,6 +125,13 @@ def getName(e): class ConfigParsed(Event): """Configuration Parsing Complete""" +class RecipeParsed(Event): + """ Recipe Parsing Complete """ + + def __init__(self, fn, d): + self.fn = fn + Event.__init__(self, d) + class StampUpdate(Event): """Trigger for any adjustment of the stamp files to happen""" diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py index 4f98bf9c3..5b1b72eec 100644 --- a/lib/bb/parse/parse_py/BBHandler.py +++ b/lib/bb/parse/parse_py/BBHandler.py @@ -109,6 +109,8 @@ def finalise(fn, d): tasklist = data.getVar('__BBTASKS', d) or [] bb.build.add_tasks(tasklist, d) + bb.event.fire(bb.event.RecipeParsed(fn, d)) + def handle(fn, d, include = 0): global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__ diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index a334c2977..a8b5829e4 100644 --- a/lib/bb/ui/knotty.py +++ b/lib/bb/ui/knotty.py @@ -140,6 +140,8 @@ def init(server, eventHandler): continue if event[0].startswith('bb.event.ConfigParsed'): continue + if event[0].startswith('bb.event.RecipeParsed'): + continue print "Unknown Event: %s" % event except KeyboardInterrupt: |