server/hook.py
changeset 3394 51a25bdd7bdc
parent 3195 a6f1daddfe8a
child 3396 fb261afd49cd
--- a/server/hook.py	Wed Sep 23 09:52:09 2009 +0200
+++ b/server/hook.py	Wed Sep 23 09:52:52 2009 +0200
@@ -64,8 +64,10 @@
     def register(self, obj, **kwargs):
         try:
             iter(obj.events)
+        except AttributeError:
+            raise
         except:
-            raise Exception('bad .events attribute %s on %s' % (obj.event, obj))
+            raise Exception('bad .events attribute %s on %s' % (obj.events, obj))
         for event in obj.events:
             if event not in ALL_HOOKS:
                 raise Exception('bad event %s on %s' % (event, obj))