From ae3d0cc316b826b8325507d960ccf84da601c3b0 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 16 Jan 2009 21:04:21 -0500 Subject: Several important cleanups. * Turn on absolute_import and unicode_literals everywhere, and deal with the aftermath. * Use 'except X as Y' everywhere. * Make the module prologues much more consistent. * Use '{}'.format() consistently, except for logger interface. * Because of the problems with calling ** args with unicode keywords, hide calls to Template.substitute() behind an API. --- mailman/core/errors.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'mailman/core/errors.py') diff --git a/mailman/core/errors.py b/mailman/core/errors.py index 51803ae79..39401127e 100644 --- a/mailman/core/errors.py +++ b/mailman/core/errors.py @@ -17,6 +17,34 @@ """Mailman errors.""" +from __future__ import absolute_import, unicode_literals + +__metaclass__ = type +__all__ = [ + 'AlreadyReceivingDigests', + 'AlreadyReceivingRegularDeliveries', + 'BadDomainSpecificationError', + 'BadPasswordSchemeError', + 'CantDigestError', + 'DiscardMessage', + 'EmailAddressError', + 'HandlerError', + 'HoldMessage', + 'HostileSubscriptionError', + 'InvalidEmailAddress', + 'LostHeldMessage', + 'MailmanError', + 'MailmanException', + 'MemberError', + 'MembershipIsBanned', + 'MustDigestError', + 'NotAMemberError', + 'PasswordError', + 'RejectMessage', + 'SomeRecipientsFailed', + 'SubscriptionError', + ] + # Base class for all exceptions raised in Mailman (XXX except legacy string -- cgit v1.2.3-70-g09d2