[Mailman-Developers] Vcard .. at least i sample on this
list :-)
Ron Jarrell
jarrell@vt.edu
Tue, 07 May 2002 15:49:42 -0400
At 09:42 PM 5/7/02 +0200, Simone Piunno wrote:
>marted́, 07 maggio 2002 alle 21:31:38, Simone Piunno ha scritto:
>
>> I think an empty text shouldn't add a MIME part to the original email...
>
>Do people think this would be fair?
>
>--- Mailman/Handlers/Decorate.py Thu Apr 11 06:18:51 2002
>+++ Mailman/Handlers/Decorate.py.new Tue May 7 21:39:41 2002
>@@ -84,8 +84,10 @@
> payload = msg.get_payload()
> if not isinstance(payload, ListType):
> payload = [payload]
>- payload.append(mimeftr)
>- payload.insert(0, mimehdr)
>+ if footer:
>+ payload.append(mimeftr)
>+ if header:
>+ payload.insert(0, mimehdr)
> msg.set_payload(payload)
> elif msg.get_main_type() <> 'multipart':
> # Okay, we've got some 'image/*' or 'audio/*' -like type. For
> # now, we
Yes, in fact *not* doing it that way is probably wrong. Unless append and insert are smart enough to be noops if there isn't really a footer and header, which is sounds like they aren't.