[CMF-checkins] CVS: CMF/CMFCollector - Collector.py:1.25

Ken Manheimer klm@zope.com
Thu, 21 Feb 2002 12:42:38 -0500


Update of /cvs-repository/CMF/CMFCollector
In directory cvs.zope.org:/tmp/cvs-serv819

Modified Files:
	Collector.py 
Log Message:
.edit(): Fixed state_email KeyError bug, and generally made sure that
state_email is set and cleared according to configuration settings.


=== CMF/CMFCollector/Collector.py 1.24 => 1.25 ===
             changed = 0
             for k, v in state_email.items():
-                if self.state_email[k] != v:
+                current_setting = self.state_email.get(k, None)
+                if ( ((not current_setting) and v)
+                    or (current_setting and (current_setting != v)) ):
                     changed = 1
                     self.state_email[k] = v
-            if changed:
+             if changed:
                 changes.append("State email")
 
         if topics is not None: