summaryrefslogtreecommitdiffstats
path: root/bitbake/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-24 10:34:53 +0100
commit507d5cc2ccab6e1bff4731cfee663f615dc7ed57 (patch)
treec79f941d5b67db9d866928b3cfdcd125607937e9 /bitbake/lib/bb/event.py
parentea346917910734b6a9e537f83bd26b18cd3bf4f0 (diff)
downloadpoky-507d5cc2ccab6e1bff4731cfee663f615dc7ed57.tar.gz
bitbake: cooker/cookerdata/event: Improve class handlers management
Similarly to the execution context changes, establish better lifetime management API of the class event handlers. (Bitbake rev: 54e35a6cceead9521f8b1dacd48e55064e85c8bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/event.py')
-rw-r--r--bitbake/lib/bb/event.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 11c063fcc8..2826e3554f 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -50,8 +50,17 @@ class Event(object):
50Registered = 10 50Registered = 10
51AlreadyRegistered = 14 51AlreadyRegistered = 14
52 52
53def get_class_handlers():
54 return _handlers
55
56def set_class_handlers(h):
57 _handlers = h
58
59def clean_class_handlers():
60 return bb.compat.OrderedDict()
61
53# Internal 62# Internal
54_handlers = bb.compat.OrderedDict() 63_handlers = clean_class_handlers()
55_ui_handlers = {} 64_ui_handlers = {}
56_ui_handler_seq = 0 65_ui_handler_seq = 0
57 66