event: fix unicode handler registration
(Bitbake rev: 413af91e56a6d2368f6cbe22c0e2a337e1289e55) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
aae8532528
commit
c0a11db877
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue