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

noreply@sourceforge.net noreply@sourceforge.net
Wed, 18 Sep 2002 06:23:57 -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: Closed
Resolution: Out of Date
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



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

>Comment By: Tomas Lindroos (skitta)
Date: 2002-09-18 16:23

Message:
Logged In: YES 
user_id=613582

Argh! I went straight to the "download" mirror on
ftp.gnu.org, and the mirror doesn't seem to be up-to-date -
the newest package there is 2.0.12.

My mistake. But not completely :)

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

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-09-18 15:52

Message:
Logged In: YES 
user_id=12800

Already fixed in Mailman 2.0.13.  Please upgrade.

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

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