~django-openid-auth/django-openid-auth/trunk

« back to all changes in this revision

Viewing changes to django_openid_auth/exceptions.py

  • Committer: Michael Hall
  • Date: 2011-08-23 17:48:54 UTC
  • mto: This revision was merged to the branch mainline in revision 85.
  • Revision ID: mhall119@ubuntu.com-20110823174854-6u31w9xa386w70k3
Cleanup exception class heirarchy and imports, make overriding the login failure handler a settings option, add additional test cases to veryfiy that overriding the handler works and that the proper exceptions are being passed

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        else:
40
40
            self.message = message
41
41
 
42
 
class StrictUsernameViolation(DjangoOpenIDException):
43
 
    pass
44
 
    
45
 
class DuplicateUsernameViolation(StrictUsernameViolation):
 
42
class DuplicateUsernameViolation(DjangoOpenIDException):
46
43
 
47
44
    def __init__(self, message=None):
48
45
        if message is None:
50
47
        else:
51
48
            self.message = message
52
49
 
53
 
class MissingUsernameViolation(StrictUsernameViolation):
 
50
class MissingUsernameViolation(DjangoOpenIDException):
54
51
 
55
52
    def __init__(self, message=None):
56
53
        if message is None: