summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/event.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-12 08:30:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:02 +0100
commit0f2c59367a649de5f57acdccfb4f1fdba9cde730 (patch)
tree7a3558a3e08e690fbb0b5bdc4044316f9ab4bbcb /bitbake/lib/bb/event.py
parentef1df516512587ad415f76a9626620992d660e45 (diff)
downloadpoky-0f2c59367a649de5f57acdccfb4f1fdba9cde730.tar.gz
bitbake: bitbake: Convert to python 3
Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. (Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/event.py')
-rw-r--r--bitbake/lib/bb/event.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 29b14f6c32..6fb37128ea 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -24,10 +24,7 @@ BitBake build tools.
24 24
25import os, sys 25import os, sys
26import warnings 26import warnings
27try: 27import pickle
28 import cPickle as pickle
29except ImportError:
30 import pickle
31import logging 28import logging
32import atexit 29import atexit
33import traceback 30import traceback
@@ -107,7 +104,7 @@ def fire_class_handlers(event, d):
107 104
108 eid = str(event.__class__)[8:-2] 105 eid = str(event.__class__)[8:-2]
109 evt_hmap = _event_handler_map.get(eid, {}) 106 evt_hmap = _event_handler_map.get(eid, {})
110 for name, handler in _handlers.iteritems(): 107 for name, handler in list(_handlers.items()):
111 if name in _catchall_handlers or name in evt_hmap: 108 if name in _catchall_handlers or name in evt_hmap:
112 if _eventfilter: 109 if _eventfilter:
113 if not _eventfilter(name, handler, event, d): 110 if not _eventfilter(name, handler, event, d):
@@ -192,7 +189,7 @@ def register(name, handler, mask=None, filename=None, lineno=None):
192 189
193 if handler is not None: 190 if handler is not None:
194 # handle string containing python code 191 # handle string containing python code
195 if isinstance(handler, basestring): 192 if isinstance(handler, str):
196 tmp = "def %s(e):\n%s" % (name, handler) 193 tmp = "def %s(e):\n%s" % (name, handler)
197 try: 194 try:
198 code = bb.methodpool.compile_cache(tmp) 195 code = bb.methodpool.compile_cache(tmp)