[CMF-checkins] CVS: CMF/CMFSetup - utils.py:1.13.2.3

Yvo Schubbe y.2005- at wcm-solutions.de
Thu Mar 10 09:42:26 EST 2005


Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv2094/CMFSetup

Modified Files:
      Tag: CMF-1_5-branch
	utils.py 
Log Message:
if a default value is defined, val might not be a string


=== CMF/CMFSetup/utils.py 1.13.2.2 => 1.13.2.3 ===
--- CMF/CMFSetup/utils.py:1.13.2.2	Sun Jan 23 09:50:39 2005
+++ CMF/CMFSetup/utils.py	Thu Mar 10 09:42:26 2005
@@ -232,8 +232,10 @@
             { '#text':           {KEY: None} } }
 
     def _convertToBoolean(self, val):
-
-        return val.lower() in ('true', 'yes', '1')
+        if isinstance(val, basestring):
+            return val.lower() in ('true', 'yes', '1')
+        else:
+            return val
 
     def _convertToUnique(self, val):
 



More information about the CMF-checkins mailing list