diff options
| author | Barry Warsaw | 2015-05-24 10:26:10 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-05-24 10:26:10 -0400 |
| commit | 4a7e3cf333359e022b6df1ecdee83141d9e54084 (patch) | |
| tree | 33cf143eab918b6b301b1197cad231807966517d | |
| parent | 6ab624a03542e72672ce3de5375cb98cd9af9da4 (diff) | |
| download | mailman-4a7e3cf333359e022b6df1ecdee83141d9e54084.tar.gz mailman-4a7e3cf333359e022b6df1ecdee83141d9e54084.tar.zst mailman-4a7e3cf333359e022b6df1ecdee83141d9e54084.zip | |
| -rw-r--r-- | src/mailman/core/errors.py | 20 | ||||
| -rw-r--r-- | src/mailman/docs/NEWS.rst | 5 | ||||
| -rw-r--r-- | src/mailman/utilities/i18n.py | 4 |
3 files changed, 8 insertions, 21 deletions
diff --git a/src/mailman/core/errors.py b/src/mailman/core/errors.py index 3ef18457f..c0c25754e 100644 --- a/src/mailman/core/errors.py +++ b/src/mailman/core/errors.py @@ -48,25 +48,7 @@ __all__ = [ -# Base class for all exceptions raised in Mailman. -class MailmanException(Exception): - pass - - - -# "New" style membership exceptions (new w/ MM2.1) -class MemberError(MailmanException): pass -class AlreadyReceivingDigests(MemberError): pass -class AlreadyReceivingRegularDeliveries(MemberError): pass -class CantDigestError(MemberError): pass -class MustDigestError(MemberError): pass - - - -# New style class based exceptions. All the above errors should eventually be -# converted. - -class MailmanError(MailmanException): +class MailmanError(Exception): """Base class for all Mailman errors.""" pass diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst index bcf49cfb6..5702f0125 100644 --- a/src/mailman/docs/NEWS.rst +++ b/src/mailman/docs/NEWS.rst @@ -32,6 +32,11 @@ Interfaces * The default `postauth.txt` and `postheld.txt` templates now no longer include the inaccurate admindb and confirmation urls. +Internal API +------------ + * A handful of unused legacy exceptions have been removed. The redundant + `MailmanException` has been removed; use `MailmanError` everywhere. + REST ---- * When creating a user via REST using an address that already exists, but diff --git a/src/mailman/utilities/i18n.py b/src/mailman/utilities/i18n.py index ba3923e06..5faf62cf9 100644 --- a/src/mailman/utilities/i18n.py +++ b/src/mailman/utilities/i18n.py @@ -32,14 +32,14 @@ import errno from itertools import product from mailman.config import config from mailman.core.constants import system_preferences -from mailman.core.errors import MailmanException +from mailman.core.errors import MailmanError from mailman.core.i18n import _ from mailman.utilities.string import expand, wrap as wrap_text from pkg_resources import resource_filename -class TemplateNotFoundError(MailmanException): +class TemplateNotFoundError(MailmanError): """The named template was not found.""" def __init__(self, template_file): |
