server/hooksmanager.py
changeset 2492 c51be1cf8317
parent 2452 868e0c75a57d
child 2493 9806571ea790
--- a/server/hooksmanager.py	Fri Jul 24 15:43:11 2009 +0200
+++ b/server/hooksmanager.py	Fri Jul 24 17:47:45 2009 +0200
@@ -220,9 +220,9 @@
                '%s: events is expected to be a tuple, not %s' % (
             cls, type(cls.events))
         for event in cls.events:
-            if event == 'server_startup':
+            if event in SYSTEM_HOOKS:
                 assert not cls.accepts or cls.accepts == ('Any',), \
-                       '%s doesnt make sense on server_startup' % cls.accepts
+                       '%s doesnt make sense on %s' % (cls.accepts, event)
                 cls.accepts = ('Any',)
             for ertype in cls.accepts:
                 if (event, ertype) in done: