[Python-bugs-list] [ python-Bugs-531966 ] email: problems generating multipart msg

noreply@sourceforge.net noreply@sourceforge.net
Tue, 19 Mar 2002 10:06:56 -0800


Bugs item #531966, was opened at 2002-03-19 13:06
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=531966&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: A.M. Kuchling (akuchling)
>Assigned to: Barry Warsaw (bwarsaw)
Summary: email: problems generating multipart msg

Initial Comment:
As reported in comp.lang.python, the example program 
given in Doc/lib/email.tex to wrap up a whole 
directory as a MIME message doesn't work if the 
directory is empty or contains only a single file.

As that script is fairly long, I've attached a 
shorter example script which also demonstrates the 
bug; coincidentally, I hit it yesterday at work.
The script crashes with:

  File 
"/data/python2/dist/src/Lib/email/Generator.py", line 
236, in _handle_multipart
    for part in msg.get_payload():
  File "/data/python2/dist/src/Lib/email/Message.py", 
line 152, in __getitem__
    return self.get(name)
  File "/data/python2/dist/src/Lib/email/Message.py", 
line 215, in get
    name = name.lower()
AttributeError: 'int' object has no attribute 'lower'



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=531966&group_id=5470