diff options
author | David Planella <david.planella@gmail.com> | 2009-01-29 00:22:52 +0100 |
---|---|---|
committer | David Planella <david.planella@gmail.com> | 2009-01-29 00:22:52 +0100 |
commit | 518b3843c0117f24b1b277a724169fb616604e4d (patch) | |
tree | 01ab5cbe392ff3a8e851dae1be4eb3a8cf8ed439 /Mailman/Errors.py | |
parent | 42fcf522d7818e9e1ee922d1a68824b0f6dcc83d (diff) | |
parent | c0da6af58657b1fe5730d3dea0e78bc17dac490a (diff) | |
download | mailman2-518b3843c0117f24b1b277a724169fb616604e4d.tar.gz mailman2-518b3843c0117f24b1b277a724169fb616604e4d.tar.xz mailman2-518b3843c0117f24b1b277a724169fb616604e4d.zip |
Merged from upstream
Diffstat (limited to 'Mailman/Errors.py')
-rw-r--r-- | Mailman/Errors.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/Mailman/Errors.py b/Mailman/Errors.py index 2e80f21a..d4af216e 100644 --- a/Mailman/Errors.py +++ b/Mailman/Errors.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2009 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -12,7 +12,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Shared mailman errors and messages.""" @@ -49,14 +50,21 @@ class MMCookieError(MMAuthenticationError): pass class MMExpiredCookieError(MMCookieError): pass class MMInvalidCookieError(MMCookieError): pass -# BAW: these still need to be converted to classes. -MMMustDigestError = "MMMustDigestError" -MMCantDigestError = "MMCantDigestError" -MMNeedApproval = "MMNeedApproval" -MMSubscribeNeedsConfirmation = "MMSubscribeNeedsConfirmation" -MMBadConfirmation = "MMBadConfirmation" -MMAlreadyDigested = "MMAlreadyDigested" -MMAlreadyUndigested = "MMAlreadyUndigested" +class MMMustDigestError: pass +class MMCantDigestError: pass +class MMNeedApproval: + def __init__(self, message=None): + self.message = message + def __str__(self): + return self.message or '' +class MMSubscribeNeedsConfirmation: pass +class MMBadConfirmation: + def __init__(self, message=None): + self.message = message + def __str__(self): + return self.message or '' +class MMAlreadyDigested: pass +class MMAlreadyUndigested: pass MODERATED_LIST_MSG = "Moderated list" IMPLICIT_DEST_MSG = "Implicit destination" |