diff options
| author | Christopher Larson <chris_larson@mentor.com> | 2012-09-10 22:23:19 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-20 10:29:33 +0100 |
| commit | 749f4f67444c7be7fe7aac0189776fd540975e09 (patch) | |
| tree | 68454bc7a1583e3d49cb99d54cbd14d949f824d2 /bitbake/lib/bb/event.py | |
| parent | f57392590a95ac5812e3cc7a2bb6751fdc34a7df (diff) | |
| download | poky-749f4f67444c7be7fe7aac0189776fd540975e09.tar.gz | |
bitbake: 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.
(Bitbake rev: 44aa0b0537d3fbd1272015e7677948f84d8c0607)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/event.py')
| -rw-r--r-- | bitbake/lib/bb/event.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index ab62d4d055..7ee28fcfcb 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
| @@ -32,6 +32,7 @@ import logging | |||
| 32 | import atexit | 32 | import atexit |
| 33 | import traceback | 33 | import traceback |
| 34 | import bb.utils | 34 | import bb.utils |
| 35 | import bb.compat | ||
| 35 | 36 | ||
| 36 | # This is the pid for which we should generate the event. This is set when | 37 | # This is the pid for which we should generate the event. This is set when |
| 37 | # the runqueue forks off. | 38 | # the runqueue forks off. |
| @@ -53,7 +54,7 @@ Registered = 10 | |||
| 53 | AlreadyRegistered = 14 | 54 | AlreadyRegistered = 14 |
| 54 | 55 | ||
| 55 | # Internal | 56 | # Internal |
| 56 | _handlers = {} | 57 | _handlers = bb.compat.OrderedDict() |
| 57 | _ui_handlers = {} | 58 | _ui_handlers = {} |
| 58 | _ui_handler_seq = 0 | 59 | _ui_handler_seq = 0 |
| 59 | 60 | ||
