[New-bugs-announce] [issue1273] email module example email-unpack.py error

Ed Vinyard report at bugs.python.org
Fri Oct 12 18:03:19 CEST 2007

New submission from Ed Vinyard:

In the email module example, email-unpack.py
(http://docs.python.org/lib/email-unpack.txt), line 56 throws an
AttributeError.  It is currently

    ext = mimetypes.guess_extension(part.get_type())

I think this line should be

    ext = mimetypes.guess_extension(part.get_content_type())

The Message documentation
(http://docs.python.org/lib/module-email.message.html) mentions that
"Changed in version 2.5: The previously deprecated methods get_type(),
get_main_type(), and get_subtype() were removed."

components: Documentation
messages: 56376
nosy: esv
severity: minor
status: open
title: email module example email-unpack.py error
type: behavior
versions: Python 2.5

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list