~launchpad-pqm/mailman/2.1

« back to all changes in this revision

Viewing changes to Mailman/Errors.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-10-21 01:06:17 UTC
  • mfrom: (975.1.1 mailman.2112)
  • Revision ID: launchpad@pqm.canonical.com-20091021010617-prbs2ay6nhxx515v
[rs=flacoste] Upgrade Mailman to upstream 2.1.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
 
1
# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
2
2
#
3
3
# This program is free software; you can redistribute it and/or
4
4
# modify it under the terms of the GNU General Public License
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 
16
# USA.
16
17
 
17
18
 
18
19
"""Shared mailman errors and messages."""
49
50
class MMExpiredCookieError(MMCookieError): pass
50
51
class MMInvalidCookieError(MMCookieError): pass
51
52
 
52
 
# BAW: these still need to be converted to classes.
53
 
MMMustDigestError    = "MMMustDigestError"
54
 
MMCantDigestError    = "MMCantDigestError"
55
 
MMNeedApproval       = "MMNeedApproval"
56
 
MMSubscribeNeedsConfirmation = "MMSubscribeNeedsConfirmation"
57
 
MMBadConfirmation    = "MMBadConfirmation"
58
 
MMAlreadyDigested    = "MMAlreadyDigested"
59
 
MMAlreadyUndigested  = "MMAlreadyUndigested"
 
53
class MMMustDigestError: pass
 
54
class MMCantDigestError: pass
 
55
class MMNeedApproval:
 
56
    def __init__(self, message=None):
 
57
        self.message = message
 
58
    def __str__(self):
 
59
        return self.message or ''
 
60
class MMSubscribeNeedsConfirmation: pass
 
61
class MMBadConfirmation:
 
62
    def __init__(self, message=None):
 
63
        self.message = message
 
64
    def __str__(self):
 
65
        return self.message or ''
 
66
class MMAlreadyDigested: pass
 
67
class MMAlreadyUndigested: pass
60
68
 
61
69
MODERATED_LIST_MSG    = "Moderated list"
62
70
IMPLICIT_DEST_MSG     = "Implicit destination"