diff options
Diffstat (limited to 'bitbake/lib/bb/event.py')
-rw-r--r-- | bitbake/lib/bb/event.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index afd5bf57c1..8559858f04 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
@@ -48,13 +48,18 @@ _handlers = {} | |||
48 | _ui_handlers = {} | 48 | _ui_handlers = {} |
49 | _ui_handler_seq = 0 | 49 | _ui_handler_seq = 0 |
50 | 50 | ||
51 | # For compatibility | ||
52 | bb.utils._context["NotHandled"] = NotHandled | ||
53 | bb.utils._context["Handled"] = Handled | ||
54 | |||
51 | def fire_class_handlers(event, d): | 55 | def fire_class_handlers(event, d): |
52 | for handler in _handlers: | 56 | for handler in _handlers: |
53 | h = _handlers[handler] | 57 | h = _handlers[handler] |
54 | event.data = d | 58 | event.data = d |
55 | if type(h).__name__ == "code": | 59 | if type(h).__name__ == "code": |
56 | exec(h) | 60 | locals = {"e": event} |
57 | tmpHandler(event) | 61 | exec h in bb.utils._context, locals |
62 | bb.utils.better_eval("tmpHandler(e)", locals) | ||
58 | else: | 63 | else: |
59 | h(event) | 64 | h(event) |
60 | del event.data | 65 | del event.data |