summaryrefslogtreecommitdiffstats
path: root/lib/bb/event.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r--lib/bb/event.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 647d02935..2d722fe8c 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -148,7 +148,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