From: Bernhard Reutner-Fischer Date: Mon, 3 Jan 2011 19:57:23 +0000 (+0100) Subject: event: fix unicode handler registration X-Git-Tag: 2011-1~3042 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=c0a11db8777eab89bcae3482fcc075a8f6a6aa2a;p=openembedded-core.git event: fix unicode handler registration (Bitbake rev: 413af91e56a6d2368f6cbe22c0e2a337e1289e55) Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 1d0fb7bfd1..3866e01f2b 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