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

Tres Seaver tseaver at zope.com
Fri Apr 22 17:44:18 EDT 2005


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

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


=== Products/CMFDefault/SyndicationTool.py 1.18.20.3 => 1.18.20.4 ===
--- Products/CMFDefault/SyndicationTool.py:1.18.20.3	Thu Apr 22 13:47:50 2004
+++ Products/CMFDefault/SyndicationTool.py	Fri Apr 22 17:43:47 2005
@@ -122,7 +122,7 @@
         if isAllowed is not None:
             self.isAllowed = isAllowed
 
-        if updatePeriod:
+        if updatePeriod is not None:
             self.syUpdatePeriod = updatePeriod
         else:
             try:
@@ -130,15 +130,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
@@ -148,8 +148,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
@@ -184,25 +184,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