[CMF-checkins] CVS: Products/CMFDefault - SyndicationTool.py:1.26.2.2

Tres Seaver tseaver at zope.com
Fri Apr 22 17:43:09 EDT 2005


Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv22299/CMFDefault

Modified Files:
      Tag: CMF-1_5-branch
	SyndicationTool.py 
Log Message:
 - CMFDefault.SyndicationTool:  Coerce property values into correct types (collector #344)


=== Products/CMFDefault/SyndicationTool.py 1.26.2.1 => 1.26.2.2 ===
--- Products/CMFDefault/SyndicationTool.py:1.26.2.1	Fri Oct 15 13:42:59 2004
+++ Products/CMFDefault/SyndicationTool.py	Fri Apr 22 17:42:36 2005
@@ -124,7 +124,7 @@
         if isAllowed is not None:
             self.isAllowed = isAllowed
 
-        if updatePeriod:
+        if updatePeriod is not None:
             self.syUpdatePeriod = updatePeriod
         else:
             try:
@@ -132,15 +132,15 @@
             except KeyError:
                 pass
 
-        if updateFrequency:
-            self.syUpdateFrequency = updateFrequency
+        if updateFrequency is not None:
+            self.syUpdateFrequency = int(updateFrequency)
         else:
             try:
                 del self.syUpdateFrequency
             except KeyError:
                 pass
 
-        if updateBase:
+        if updateBase is not None:
             if type( updateBase ) is type( '' ):
                 updateBase = DateTime( updateBase )
             self.syUpdateBase = updateBase
@@ -150,8 +150,8 @@
             except KeyError:
                 pass
 
-        if max_items:
-            self.max_items = max_items
+        if max_items is not None:
+            self.max_items = int(max_items)
         else:
             try:
                 del self.max_items
@@ -186,25 +186,25 @@
         if syInfo is None:
             raise 'Syndication is Disabled'
 
-        if updatePeriod:
+        if updatePeriod is not None:
             syInfo.syUpdatePeriod = updatePeriod
         else:
             syInfo.syUpdatePeriod = self.syUpdatePeriod
 
-        if updateFrequency:
-            syInfo.syUpdateFrequency = updateFrequency
+        if updateFrequency is not None:
+            syInfo.syUpdateFrequency = int(updateFrequency)
         else:
             syInfo.syUpdateFrequency = self.syUpdateFrequency
 
-        if updateBase:
+        if updateBase is not None:
             if type( updateBase ) is type( '' ):
                 updateBase = DateTime( updateBase )
             syInfo.syUpdateBase = updateBase
         else:
             syInfo.syUpdateBase = self.syUpdateBase
 
-        if max_items:
-            syInfo.max_items = max_items
+        if max_items is not None:
+            syInfo.max_items = int(max_items)
         else:
             syInfo.max_items = self.max_items
 



More information about the CMF-checkins mailing list