~sambuddhabasu1/mailman/fix_mailman_run_error

« back to all changes in this revision

Viewing changes to src/mailman/handlers/cook_headers.py

  • Committer: Barry Warsaw
  • Date: 2013-06-17 13:36:43 UTC
  • Revision ID: barry@list.org-20130617133643-uj7atdykh2whwabw
 * `bin/runner` command has been simplified and its command line options
   reduced.  Now, only one `-r/--runner` option may be provided and the
   round-robin feature has been removed.
 * Fixed REST server crash on `reopen` command.  Identification and test
   provided by Aurélien Bompard.  (LP: #1184376)

Also:

 * bin/runner now uses standard argparse instead of ScriptOptions.
 * The entire bin/runner machinery has bee reorganized and simplified.  There
 * is no more Loop class.  Signal setting is moved directly into the base
   Runner class and overrided in specific subclasses (e.g. RESTRunner which
   must cleanly shutdown its TCPServer).  The runner exit status is now set
   directly on the Runner instance.
 * Fixed a few minor style issues.
 * In order to cleanly shutdown the RESTRunner's WSGI server, we must start a
   subthread which only watches for an Event and then calls the server's
   shutdown() method.  It has to be this way because the WSGI server itself
   (due to interactions with SQLite), and the signal handlers (due to Python's
   signal handling semantics) must both run in the main thread.  However, the
   shutdown() must be invoked from a subthread in order to prevent deadlock.
 * Refactor the RESTLayer to eliminate duplication of code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
        # above code?
156
156
        # Also skip Cc if this is an anonymous list as list posting address
157
157
        # is already in From and Reply-To in this case.
158
 
        if (mlist.personalize == Personalization.full and
159
 
            mlist.reply_goes_to_list != ReplyToMunging.point_to_list and
 
158
        if (mlist.personalize is Personalization.full and
 
159
            mlist.reply_goes_to_list is not ReplyToMunging.point_to_list and
160
160
            not mlist.anonymous_list):
161
161
            # Watch out for existing Cc headers, merge, and remove dups.  Note
162
162
            # that RFC 2822 says only zero or one Cc header is allowed.