diff options
-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 |