summaryrefslogtreecommitdiffstats
path: root/lib/bb/event.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-23 10:50:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-23 10:57:35 +0100
commit54e35a6cceead9521f8b1dacd48e55064e85c8bd (patch)
treebba12b3a75b88fdd86c8126cf7197142418abd3f /lib/bb/event.py
parent6c3281a140125337fc75783973485e16785d05a1 (diff)
downloadbitbake-contrib-54e35a6cceead9521f8b1dacd48e55064e85c8bd.tar.gz
cooker/cookerdata/event: Improve class handlers management
Similarly to the execution context changes, establish better lifetime management API of the class event handlers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r--lib/bb/event.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 11c063fcc..2826e3554 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -50,8 +50,17 @@ class Event(object):
Registered = 10
AlreadyRegistered = 14
+def get_class_handlers():
+ return _handlers
+
+def set_class_handlers(h):
+ _handlers = h
+
+def clean_class_handlers():
+ return bb.compat.OrderedDict()
+
# Internal
-_handlers = bb.compat.OrderedDict()
+_handlers = clean_class_handlers()
_ui_handlers = {}
_ui_handler_seq = 0