[Spambayes-checkins] spambayes/spambayes OptionsClass.py,1.24,1.25
Tony Meyer
anadelonbrin at users.sourceforge.net
Tue Jun 1 20:28:39 EDT 2004
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28042/spambayes
Modified Files:
OptionsClass.py
Log Message:
Fix [ 961713 ] server error when tryingto change Statistics Options
The problem options were the notate_ ones. If they were a single value they could cause trouble changing any of the options.
Bugfix candidate.
Index: OptionsClass.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/OptionsClass.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** OptionsClass.py 23 Mar 2004 04:39:15 -0000 1.24
--- OptionsClass.py 2 Jun 2004 00:28:35 -0000 1.25
***************
*** 261,268 ****
# This will fall apart if the allowed_value is a tuple,
# but not a homogenous one...
! if type(self.allowed_values) in types.StringTypes:
vals = list(self._split_values(value))
else:
! vals = value.split()
if len(self.default_value) > 0:
to_type = type(self.default_value[0])
--- 261,271 ----
# This will fall apart if the allowed_value is a tuple,
# but not a homogenous one...
! if isinstance(self.allowed_values, types.StringTypes):
vals = list(self._split_values(value))
else:
! if isinstance(value, types.TupleType):
! vals = list(value)
! else:
! vals = value.split()
if len(self.default_value) > 0:
to_type = type(self.default_value[0])
More information about the Spambayes-checkins
mailing list