[Mailman-Users] question about config_list

Mark Sapiro mark at msapiro.net
Fri Apr 18 22:54:57 CEST 2008


charlie derr wrote:

>... when I try to use this generated config file with 'config_list -i' somehow the 
>floating point value gets truncated (in a very pythonic way -- no rounding up) to an integer (though it still retains the floating 
>point notation).


There appears to be a bug in the validation of numeric values which
causes any floating point value of a 'standard' list attribute to be
replaced by int(value). This only affects bounce_score_threshold as
that is the only 'standard' list attribute which is a floating point
value. It also only affects config_list because of the way in which
config_list processes it's input.

Note that you can work around this by using

bounce_score_threshold = '0.75'

instead of

bounce_score_threshold = 0.75

in the input file to config_list. If the value is a string, the numeric
validatation code will work as intended and return the correct
floating point value.


>I discovered that I didn't actually need a floating point value there (1.0 was just as good as 0.75 for my 
>purposes, so I simply used that), but since the documentation claims that a floating point value is acceptable, this seemed worth 
>reporting.


Yes. As you discovered, a threshold of 1.0 is as good as 0.75, but this
is a bug and thanks for the report.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list