[Mailman-Users] Umbrella Lists & Subject Prefixes
Mike Peachey
mike.peachey at jennic.com
Fri Sep 21 17:35:21 CEST 2007
Mark Sapiro wrote:
> Mike Peachey wrote:
>> I'm using this anyway :-)
>>
>> if msg.has_key('x-no-subject-prefix') and msg.get('x-no-subject-prefix',
>> '').lower() == 'yes':
>
>
> You don't need to test separately for the presence of the header.
> That's what the second argument to msg.get() is for. It is returned
> when the header named in the first argument isn't present, so the
> above can be simplified to
>
> if msg.get('x-no-subject-prefix', '').lower() == 'yes':
>
> which is true if and only if there is an 'x-no-subject-prefix' header
> with value 'yes'
>
Ta.
--
Kind Regards,
__________________________________________________
Mike Peachey, IT
Tel: +44 114 281 2655
Fax: +44 114 281 2951
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
Comp Reg No: 3191371 - Registered In England
http://www.jennic.com
__________________________________________________
More information about the Mailman-Users
mailing list