Mike Peachey wrote: >Mark Sapiro wrote: >> >> and add two lines after the comment so it becomes >> >> def prefix_subject(mlist, msg, msgdata): >> # Add the subject prefix unless the message is a digest or is being >> fast >> # tracked (e.g. internally crafted, delivered to a single user such >> as the >> # list admin). >> if msg.get('x-no-archive', None) == None: >> return >> prefix = mlist.subject_prefix >> >> If you decide to use a header other than X-No-Archive:, you'd replace >> 'x-no-archive' above with the name of that header. >> > >That's just the solution I was looking for, but was being >put off-track by the 1999 solution ...
Ooops... The code above contains a mistake. It will prefix the subject only for messages that DO have the X-No-Archive: header. What you want in the if test is if msg.get('x-no-archive', None) <> None: return to skip the prefix if the header is not None. Those double negatives will get you every time. ;-) -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp