diff options
| author | bwarsaw | 2007-03-22 04:29:31 +0000 |
|---|---|---|
| committer | bwarsaw | 2007-03-22 04:29:31 +0000 |
| commit | 4b481c179c96440b3785ecc5a069af4d696f75a3 (patch) | |
| tree | 09f5a1723223f4e2f22bcb04daa676eb69cf8147 /Mailman/Errors.py | |
| parent | daeb5dbf03fde77265e42392cae0913765423f94 (diff) | |
| download | mailman-4b481c179c96440b3785ecc5a069af4d696f75a3.tar.gz mailman-4b481c179c96440b3785ecc5a069af4d696f75a3.tar.zst mailman-4b481c179c96440b3785ecc5a069af4d696f75a3.zip | |
Diffstat (limited to 'Mailman/Errors.py')
| -rw-r--r-- | Mailman/Errors.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Mailman/Errors.py b/Mailman/Errors.py index 2c1686fdb..10081f08d 100644 --- a/Mailman/Errors.py +++ b/Mailman/Errors.py @@ -58,8 +58,6 @@ class MembershipIsBanned(MemberError): pass # Exception hierarchy for various authentication failures, can be # raised from functions in SecurityManager.py class MMAuthenticationError(MailmanException): pass -class MMBadPasswordError(MMAuthenticationError): pass -class MMPasswordsMustMatch(MMAuthenticationError): pass class MMCookieError(MMAuthenticationError): pass class MMExpiredCookieError(MMCookieError): pass class MMInvalidCookieError(MMCookieError): pass @@ -191,3 +189,26 @@ class SchemaVersionMismatchError(DatabaseError): from Mailman.Version import DATABASE_SCHEMA_VERSION return 'Incompatible database schema version (got: %d, expected: %d)' \ % (self._got, DATABASE_SCHEMA_VERSION) + + + +class PasswordError(MailmanError): + """A password related error.""" + + +class MMBadPasswordError(PasswordError, MMAuthenticationError): + """A bad password was given.""" + + +class MMPasswordsMustMatch(PasswordError, MMAuthenticationError): + """The given passwords don't match.""" + + +class BadPasswordSchemeError(PasswordError): + """A bad password scheme was given.""" + + def __init__(self, scheme_name='unknown'): + self.scheme_name = scheme_name + + def __str__(self): + return 'A bad password scheme was given: %s' % self.scheme_name |
