equal
deleted
inserted
replaced
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__)) |