summaryrefslogtreecommitdiffstats
path: root/lib/bb/event.py
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2012-09-10 22:23:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-20 10:24:09 +0100
commit44aa0b0537d3fbd1272015e7677948f84d8c0607 (patch)
tree1b11635e8b0d6d749fe057b779c6b3066c4837e6 /lib/bb/event.py
parentac75b06744e73399ca1fbda322ef851ae5754b0a (diff)
downloadbitbake-contrib-44aa0b0537d3fbd1272015e7677948f84d8c0607.tar.gz
compat, event: use OrderedDict from py2.7 for the event handlers
This ensures that our event handlers get run in registration order, making the behavior more deterministic. I pulled in the python2.7 OrderedDict to avoid essentially reimplementing a version of it ourselves, figuring we can drop it when we bump our required python version next. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r--lib/bb/event.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index ab62d4d05..7ee28fcfc 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -32,6 +32,7 @@ import logging
import atexit
import traceback
import bb.utils
+import bb.compat
# This is the pid for which we should generate the event. This is set when
# the runqueue forks off.
@@ -53,7 +54,7 @@ Registered = 10
AlreadyRegistered = 14
# Internal
-_handlers = {}
+_handlers = bb.compat.OrderedDict()
_ui_handlers = {}
_ui_handler_seq = 0