[Mailman-Developers] [ mailman-Bugs-611065 ] MailCommandHandler bug w/ python 1.5.2

noreply@sourceforge.net noreply@sourceforge.net
Wed, 18 Sep 2002 05:25:11 -0700


Bugs item #611065, was opened at 2002-09-18 15:22
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=611065&group_id=103

Category: mail delivery
Group: 2.0.x
Status: Open
Resolution: None
>Priority: 7
Submitted By: Tomas Lindroos (skitta)
Assigned to: Nobody/Anonymous (nobody)
Summary: MailCommandHandler bug w/ python 1.5.2

Initial Comment:
The file Mailman/MailCommandHandler.py contains two
lines of code that makes (at least) the cron-job
qrunner fail when using python 1.5.2. I have not
checked wether this could effect other parts of the
system.

The problem can be found on lines 123-124, where calls
to the method .lower() is made. With python 1.5.2,
string objects do not have this method.

The obvious fix is of course:

Mailman/ $ diff MailCommandHandler.py
MailCommandHandler.py~
123,124c123,124
<         precedence =
string.lower(msg.get('precedence', ''))
<         ack = string.lower(msg.get('x-ack', ''))
---
>         precedence = msg.get('precedence',
'').lower()
>         ack = msg.get('x-ack', '').lower()


The strings-library is used at all other places in the
file, and a 

grep lower\( `find . -name "*.py"` | grep -v
string.lower

finds no other problems of this type. (I don't
guarantee that :)

The traceback log from the error-log:

qrunner(22189): Traceback (innermost last):
qrunner(22189):   File
"/export/mailman-2.0.12/cron/qrunner", line 283, in ?
qrunner(22189):      kids = main(lock)
qrunner(22189):   File
"/export/mailman-2.0.12/cron/qrunner", line 253, in
main
qrunner(22189):      keepqueued =
dispose_message(mlist, msg, msgdata)
qrunner(22189):   File
"/export/mailman-2.0.12/cron/qrunner", line 157, in
dispose_message
qrunner(22189):      mlist.ParseMailCommands(msg)
qrunner(22189):   File
"/export/mailman-2.0.12/Mailman/MailCommandHandler.py",
line 123, in ParseMailCommands
qrunner(22189):      precedence = msg.get('precedence',
'').lower()
qrunner(22189): AttributeError :  'string' object has
no attribute 'lower' 

        /skitta
-- 
Tomas 'Skitta' Lindroos. 
UNIX Systems Analyst, Åbo Akademi University



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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=611065&group_id=103