diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2011-01-03 20:57:23 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 15:00:22 +0000 |
commit | c0a11db8777eab89bcae3482fcc075a8f6a6aa2a (patch) | |
tree | 8146d2a537df8b480f74c2956b3fb577670a6a6f /bitbake | |
parent | aae85325289a83d21606621310894d5d6f56b50a (diff) | |
download | poky-c0a11db8777eab89bcae3482fcc075a8f6a6aa2a.tar.gz |
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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/event.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): | |||
147 | 147 | ||
148 | if handler is not None: | 148 | if handler is not None: |
149 | # handle string containing python code | 149 | # handle string containing python code |
150 | if type(handler).__name__ == "str": | 150 | if isinstance(handler, basestring): |
151 | tmp = "def tmpHandler(e):\n%s" % handler | 151 | tmp = "def tmpHandler(e):\n%s" % handler |
152 | comp = bb.utils.better_compile(tmp, "tmpHandler(e)", "bb.event._registerCode") | 152 | comp = bb.utils.better_compile(tmp, "tmpHandler(e)", "bb.event._registerCode") |
153 | _handlers[name] = comp | 153 | _handlers[name] = comp |