summaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-01-03 20:57:23 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:56:38 +0000
commit413af91e56a6d2368f6cbe22c0e2a337e1289e55 (patch)
treed0cbfea6884f13a4ce955760c4e5132529487695 /lib/bb
parent884365228fcaac07421ac1440d4946693fb628c5 (diff)
downloadbitbake-413af91e56a6d2368f6cbe22c0e2a337e1289e55.tar.gz
event: fix unicode handler registration
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/event.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 647d02935..2d722fe8c 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -148,7 +148,7 @@ def register(name, handler):
if handler is not None:
# handle string containing python code
- if type(handler).__name__ == "str":
+ if isinstance(handler, basestring):
tmp = "def tmpHandler(e):\n%s" % handler
comp = bb.utils.better_compile(tmp, "tmpHandler(e)", "bb.event._registerCode")
_handlers[name] = comp