From c0a11db8777eab89bcae3482fcc075a8f6a6aa2a Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 3 Jan 2011 20:57:23 +0100 Subject: event: fix unicode handler registration (Bitbake rev: 413af91e56a6d2368f6cbe22c0e2a337e1289e55) Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Richard Purdie --- bitbake/lib/bb/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/event.py') diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 1d0fb7bfd..3866e01f2 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py @@ -147,7 +147,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 -- cgit v1.2.3