~msapiro/mailman/topics

« back to all changes in this revision

Viewing changes to Mailman/Errors.py

Two of the 'new' class exceptions are raised with an argument.

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."""
51
52
 
52
53
class MMMustDigestError: pass
53
54
class MMCantDigestError: pass
54
 
class MMNeedApproval: pass
 
55
class MMNeedApproval:
 
56
    def __init__(self, message=None):
 
57
        self.message = message
 
58
    def __str__(self):
 
59
        return self.message or ''
55
60
class MMSubscribeNeedsConfirmation: pass
56
 
class MMBadConfirmation: pass
 
61
class MMBadConfirmation:
 
62
    def __init__(self, message=None):
 
63
        self.message = message
 
64
    def __str__(self):
 
65
        return self.message or ''
57
66
class MMAlreadyDigested: pass
58
67
class MMAlreadyUndigested: pass
59
68