server/hook.py
changeset 5162 6340ed9f8caf
parent 5160 27d4cab5db03
child 5201 2b4267157f85
equal deleted inserted replaced
5161:a19f22bacedc 5162:6340ed9f8caf
   200     def check_events(cls):
   200     def check_events(cls):
   201         try:
   201         try:
   202             for event in cls.events:
   202             for event in cls.events:
   203                 if event not in ALL_HOOKS:
   203                 if event not in ALL_HOOKS:
   204                     raise Exception('bad event %s on %s.%s' % (
   204                     raise Exception('bad event %s on %s.%s' % (
   205                         event, obj.__module__, obj.__name__))
   205                         event, cls.__module__, cls.__name__))
   206         except AttributeError:
   206         except AttributeError:
   207             raise
   207             raise
   208         except TypeError:
   208         except TypeError:
   209             raise Exception('bad .events attribute %s on %s.%s' % (
   209             raise Exception('bad .events attribute %s on %s.%s' % (
   210                 cls.events, cls.__module__, cls.__name__))
   210                 cls.events, cls.__module__, cls.__name__))