aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Gui
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2008-04-21 09:04:49 -0700
committerMark Sapiro <mark@msapiro.net>2008-04-21 09:04:49 -0700
commitd6697cceacf059536bb62c68ea42de2b8e232b77 (patch)
treed2e0cdbc0170f76da6555409f31639e4522cf802 /Mailman/Gui
parent8ee93ebea90fa40ba822f3ec858a361f3e81ce32 (diff)
downloadmailman2-d6697cceacf059536bb62c68ea42de2b8e232b77.tar.gz
mailman2-d6697cceacf059536bb62c68ea42de2b8e232b77.tar.xz
mailman2-d6697cceacf059536bb62c68ea42de2b8e232b77.zip
Fixed a problem where GuiBase._getValidValue() would truncate a floating
point Number type to an int if the value was a float instead of a numeric string. This affected setting floating point values with config_list. Updated NEWS for 2.1.10 final.
Diffstat (limited to 'Mailman/Gui')
-rw-r--r--Mailman/Gui/GUIBase.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Mailman/Gui/GUIBase.py b/Mailman/Gui/GUIBase.py
index 19714e1c..a365acaf 100644
--- a/Mailman/Gui/GUIBase.py
+++ b/Mailman/Gui/GUIBase.py
@@ -99,6 +99,11 @@ class GUIBase:
return val
# This is a number, either a float or an integer
if wtype == mm_cfg.Number:
+ # The int/float code below doesn't work if we are called from
+ # config_list with a value that is already a float. It will
+ # truncate the value to an int.
+ if isinstance(val, float):
+ return val
num = -1
try:
num = int(val)