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): 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 |