summaryrefslogtreecommitdiff
path: root/Mailman/Errors.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* HostileSubscriptionError: New exception used to signal an inviteebwarsaw2003-03-161-4/+11
| | | | attempting to confirm to a different list.
* MMNotAMemberError, MMNoSuchUserError: Get rid of these since we don'tbwarsaw2002-12-021-2/+0
| | | | need three ways to raise "not a member" exceptions.
* BadListNameError: New exception for when the list name is invalid.bwarsaw2002-10-061-0/+1
|
* New error class MembershipIsBanned; used in support of the new bannedbwarsaw2002-01-061-1/+2
| | | | subscription address feature.
* I don't think we need to import Mailman.i18n anymore. Anybwarsaw2001-11-211-6/+6
| | | | | | translatable strings here just need to be marked as such, using the identity _() function. They'll always get translated before they're used.
* RejectMessage: Add an __init__() to initialize the rejection noticebwarsaw2001-10-151-3/+10
| | | | message. Add a notice() method to return the rejection notice.
* HoldMessage: Let's do this the non-clever way (which was causing toobwarsaw2001-09-041-3/+7
| | | | | | | | | many problem due to docstring non-extraction in pygettext). Now the attribute `reason' is used as the reason instead of the docstring, and reason_notice() is the called interface. This mirrors exactly how rejection notices are done. HoldMessage.__str__(): Removed.
* MMMemberError, MMBadUserError, MMNotAMemberError, MMNoSuchUserError,bwarsaw2001-07-191-6/+14
| | | | | | | | | | | MMAlreadyAMember: Make these class based exceptions. MemberError, NotAMemberError, AlreadyReceivingDigests, AlreadyReceivingRegularDeliveries, CantDigestError, MustDigestError: Add these "new wave" exceptions, which are raised by the MemberAdaptors. NB: I really need to go through and make all the exceptions sane!
* MessageHeld => HoldMessagebwarsaw2001-07-101-1/+4
| | | | | RejectMessage: New base exception class, used to signal messages that should be bounced back to the original sender.
* SomeRecipientsFailed constructor takes two lists of failed recipients,bwarsaw2001-02-161-0/+4
| | | | | the temporaries and the permanents. Store these in instance variables.
* HandlerError, MessageHeld, DiscardMessage, SomeRecipientsFailed,bwarsaw2001-02-151-1/+31
| | | | LoopError: all error classes are now moved here.
* MESSAGE_DECORATION_NOTE: Removed. Text has been moved tobwarsaw2000-09-171-23/+0
| | | | templates/headfoot.html. Closes SF bug #114167, Jitterbug PR #209.
* MMListAlreadyExistsError: new exception.bwarsaw2000-04-091-0/+1
|
* Consistency in list-opening related exceptions.bwarsaw2000-04-041-4/+8
| | | | | | | | | | | | | MMListError: new base class for all list-opening related exceptions. MMUnknownListError: Change to class-based exception inheriting from MMListError. MMBadListError: Becomes class MMCorruptListDatabaseError MMListNotReady: Becomes class MMListNotReadyError MMBadConfigError: removed.
* Update the copyright lines to include the years 1999 & 2000.bwarsaw2000-03-211-1/+1
|
* MailmanError: new exception class which will eventually be the basebwarsaw1999-11-151-13/+35
| | | | | | | | | | | | class for all Mailman exception. When creating a new exception class, or converting an old string-based exception, always use this as the base class. MMLoopingPost, EmailAddressError: Use MailmanError as base class. LostHeldMessage: New exception which handles the case when the held message text file gets lost (i.e. deleted from the file system) during an admindb transaction.
* MMBadRequestId: removedbwarsaw1999-11-101-2/+4
| | | | MMLoopingPost: make this a class
* Created MMAuthenticationError exception class hierarchy, into whichhmeland1999-06-131-2/+9
| | | | MMBadPasswordError and MMPasswordsMustMatch have been moved.
* LOOPING_POST => MMLoopingPostbwarsaw1999-04-161-1/+1
|
* A start on the conversion to class-based exceptions :-)bwarsaw1999-01-091-2/+9
| | | | | | | Because I want to be able to catch both MMBadEmailError and MMHostileAddress in a `politically correct' and clean except clause, I made both exceptions classes which derive from new exception class EmailAddressError.
* These changing are a cleanup of the sorry state the subscription policycotton1998-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was in (which was largely my fault from before). Before: 1) web_subscribe_requires_confirmation was showing in the admin cgi, but not working. 2) all subscribes that required admin approval were going through the confirmation process. 3) the code implementing the confirmation process was distributed between the subscribe cgi and MailCommandHandler, duplicated in places and disrupting the previous interface to list.AddMember. 4) the open_subscribe variable was confusing because it didn't pay any attention to confirmations. Now, things are organized a little differently, but in a much cleaner way. there is one variable that deals with subscription policy, called "subscribe_policy". It's setting determines what happens with both the web based and the mail based subscriptions. there are 4 options: 0 - open subscribe policy 1 - confirmation required 2 - admin approval required 3 - confirmation and then admin approval required there is a site configuration variable in Defaults.py called ALLOW_OPEN_SUBSCRIBE, which determines whether or not an open subscribe policy is an option. If it's not, the admin cgi interface does not present it as an option. I have restored a slightly modified version of the prior-to-confirmations interface for list.AddMember, where all you have to code is: try: list.AddMember(email, digest, password) except Errors.MMBadEmail: except Errors.MMAlreadySubscribed: [ ... all those other good things it used to check ...] except Errors.MMSubscribeNeedsConfirmation: # the confirmation has already been sent. # so just report accordingly to whatever the ap is. In addition, I have moved the code for processing a confirmation request to MailList.py so that it can be used in both a confirmation cgi (which does not yet exist, but will) and the mailcmd script. it's interface is: try: list.ProcessConfirmation(cookie) except Errors.MMBadConfirmation: # the cookie doesn't correspond to anything except Errors.MMNeedApproval: # the list is set to approve+confirm subscribe_policy. A listing of the changes to the files follows: Mailman/Defaults.in: added ALLOW_OPEN_SUBSCRIBE,DEFAULT_SUBSCRIBE_POLICY deleted DEFAULT_OPEN_SUBSCRIBE, changed DATA_FILE_VERSION to 5 Mailman/Errors.py: added MMBadConfirmation and MMSubscribeNeedsConfirmation Mailman/MailCommandHandler.py: moved the confirmation code to MailList.py and use the new (old) list.AddMember interface MailMan/MailList.py: added .ProcessConfirmation(cookie), changed AddMember to fit new (old) interface. deleted config info for open_subscribe and replaced with config info for subscribe_policy that acts according to mm_cfg.ALLOW_OPEN_SUBSCRIBE. Also made list.ApprovedAddMember's "noack" argument just "ack" for simplicities sake and made it default to None instead of 0 so that if the ack variable isn't passed, it sets it to the value of the lists .send_welcome_msg setting. Mailman/versions.py: added handling for new data file format, replacing open_subscribe with a reasonable value for subscribe_policy based on a combination of what open_subscribe is and what mm_cfg.ALLOW_OPEN_SUBSCRIBE is set to. Mailman/Cgi/admin.py: made the cgi handle the output and processing of subscribe_policy based on the setting of mm_cfg.ALLOW_OPEN_SUBSCRIBE. removed erroneous processing of whether or not to send an ack with mass subscription based on new interface to list.ApprovedAddMember (this processing is to be replaced with a good idea from john -- making mass subscribe have it's own option of whether or not to send welcome messages). Mailman/Cgi/subscribe.py: made backgrounds white, and made it use the MailList.AddMember interface described above. Mailman/Makefile.in: looks like this part of that distclean patch from NAGY didn't make it in yet (rm'ing mm_cfg.py as well as Defaults.py) scott
* Removed RCS crudbwarsaw1998-06-191-2/+2
| | | | | | | Note: MESSAGE_DECORATION_NOTE should be pulled out into a templates/*.txt file. Note: Exceptions should be converted to class based.
* Fixed a typo in the zipcode.viega1998-05-261-2/+2
|
* Added copyright notices to all source files where I am legally entitled to ↵viega1998-05-251-1/+18
| | | | | | | do so. Added a copy of the GNU GPL. Added information about mailman-users in README, and reworded some text in there (made the credits less verbose... perhaps they should move to a credits file?)
* New LOOPING_POST error message, for wide-loop detection disposition.klm1998-04-271-1/+2
|
* Added missing "</dl>" to MESSAGE_DECORATION_NOTE.mailman1998-04-231-1/+2
|
* Move MESSAGE_DECORATION_NOTE here from mm-defaults, and move all themailman1998-04-091-4/+29
| | | | | | | messages to below the errors. Preparing to package a distribution - add a module docstring and __version__ info.
* Defining error-message vars for use instead of string literals, somailman1998-04-081-1/+4
| | | | | they can be recognized in post script, eg to avoid sending hold messages to spammers.
* MMBadUserError for user records that have been corrupted, eg notmailman1998-03-261-0/+1
| | | | | introduced via the standard interface, or changed by finagling of one sort or the other.
* Add MODERATED_LIST_MSG so it can be recognized across modules - inmailman1998-03-191-0/+2
| | | | | particular, so 'post' script can recognize when messages are being held for approval due to moderation.
* New error MMBadConfigError.klm1998-03-081-0/+1
|
* Add errors MMUnknownListError and MMBadListError, so maillist.py canmailman1998-03-041-0/+3
| | | | express how list loads fail.
* Initial revisionmailman1998-02-271-0/+16