This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: email.Message should supress warning from uu.decode
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, msapiro
Priority: normal Keywords:

Created on 2006-01-18 20:55 by msapiro, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Message.py.patch.txt msapiro, 2006-01-18 20:55 Patch message.py to set quiet flag in uu.decode call
Messages (2)
msg27303 - (view) Author: Mark Sapiro (msapiro) * (Python triager) Date: 2006-01-18 20:55
part.get_payload(decode=True) of a uuencoded
email.Message() sub-part can result in warning messages
being written to sys.stderr. These warnings occur when
pad characters other than encoded zeros were used to
fill out the last encoded line to a multiple of 4
characters (+1 for the count character). Such non-zero
padded encoded parts are produced by some current
versions of Eudora and perhaps other MUAs. The warnings
are unnecessary in this case and cause problems for
other software, e.g., Mailman.

get_payload(decode=True) calls uu.decode to actually
decode the part payload. It should specify the
quiet=True flag in this call to supress the warning.

A suggested patch against Python 2.4.2 is attached.
msg27304 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2006-02-09 04:04
Logged In: YES 
user_id=12800

r42279 for email 2.5, although we have to be more elaborate
since Python 2.1's uu.decode() does not have a 'quiet' flag.
 When I port this to Python 2.4 and 2.5, I will implement
the fix as given since we won't need the sneakiness.
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 42805
2006-01-18 20:55:35msapirocreate