[CMF-checkins] CVS: CMF/CMFCollector - CollectorIssue.py:1.38

Ken Manheimer klm@zope.com
Wed, 19 Dec 2001 15:16:21 -0500


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

Modified Files:
	CollectorIssue.py 
Log Message:
_send_update_notice(): Properly handle multiple whitespace or , or
,+whitespace separated state_email addresses.


=== CMF/CMFCollector/CollectorIssue.py 1.37 => 1.38 ===
         if (self.state_email.has_key(new_status)
             and self.state_email[new_status]):
-            se = ("_%s_ recipient" % new_status, self.state_email[new_status])
-            candidates.append(se)       # For recipients-debug
-            recipients.append(se)
+            for addr in re.split(", *| +", self.state_email[new_status]):
+                se = ("_%s_ recipient" % new_status, addr)
+                candidates.append(se)       # For recipients-debug
+                if addr not in recipients:
+                    recipients.append(se)
 
         if recipients:
             to = ", ".join(["%s <%s>" % (name, email)