[Mailman-Users] [Mailman-Developers] Problems with uuencoded attachments

Tokio Kikuchi tkikuchi at is.kochi-u.ac.jp
Mon Jan 16 01:25:08 CET 2006


Barry Warsaw wrote:
> On Jan 14, 2006, at 9:59 PM, Tokio Kikuchi wrote:
> 
> 
>>Mark Sapiro wrote:
>>
>>
>>
>>>>File "/usr/lib/python2.3/uu.py", line 139, in decode
>>>>  sys.stderr.write("Warning: %s\n" % str(v))
>>>>File "/usr/lib/mailman/Mailman/Logging/MultiLogger.py", line 45,  
>>>>in write
>>>>  _logexc(logger, msg)
>>>>File "/usr/lib/mailman/Mailman/Logging/Utils.py", line 22, in  
>>>>_logexc
>>>>  sys.__stderr__.write('Logging error: %s\n' % logger)
>>>>IOError: [Errno 32] Broken pipe
>>
>>>I think this could be fixed by changing
>>>"/usr/lib/mailman/pythonlib/email/Message.py", line 223 from
>>>                    uu.decode(StringIO(payload+'\n'), sfp)
>>>to
>>>                    uu.decode(StringIO(payload+'\n'), sfp,  
>>>quiet=True)
>>
>>
>>There should be other chances that Python builtin modules spew  
>>warnings to sys.stderr.  How about this patch for Logging/Utils.py  
>>to write these messages into syslog facility.
> 
> 
> The only problem is that currently Mailman does not use the syslog  
> module, and I'm uncomfortable with adding it for this one situation  
> (are there others?).  We should definitely be passing the quiet flag  
> to uu.decode(), but OTOH maybe we should also be testing whether  
> sys.__stderr__ is detached and then redirecting that to logs/errors?
> 
In usual mailman qrunner execs, stderr is logged into logs/errors.  It 
is the additional tee_to_real_stderr in LogStdErr() setting which wants 
to print the error into real stderr.

Isn't it safe to put the tee_to_real_stderr value 0 in bin/qrunner script ?


-- 
Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
http://weather.is.kochi-u.ac.jp/



More information about the Mailman-Users mailing list