comparison roundup/roundupdb.py @ 2738:3a7039bc2f97

couple more msgid == None fixes
author Richard Jones <richard@users.sourceforge.net>
date Fri, 08 Oct 2004 05:51:00 +0000
parents 37e2b70105f7
children 3468f74bd7ce
comparison
equal deleted inserted replaced
2737:37e2b70105f7 2738:3a7039bc2f97
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: roundupdb.py,v 1.114 2004-10-08 05:44:33 richard Exp $ 18 # $Id: roundupdb.py,v 1.115 2004-10-08 05:51:00 richard Exp $
19 19
20 """Extending hyperdb with types specific to issue-tracking. 20 """Extending hyperdb with types specific to issue-tracking.
21 """ 21 """
22 __docformat__ = 'restructuredtext' 22 __docformat__ = 'restructuredtext'
23 23
222 note = self.generateCreateNote(nodeid) 222 note = self.generateCreateNote(nodeid)
223 223
224 # If we have new recipients, update the message's recipients 224 # If we have new recipients, update the message's recipients
225 # and send the mail. 225 # and send the mail.
226 if sendto or bcc_sendto: 226 if sendto or bcc_sendto:
227 if msgid: 227 if msgid is not None:
228 self.db.msg.set(msgid, recipients=recipients) 228 self.db.msg.set(msgid, recipients=recipients)
229 self.send_message(nodeid, msgid, note, sendto, from_address, 229 self.send_message(nodeid, msgid, note, sendto, from_address,
230 bcc_sendto) 230 bcc_sendto)
231 231
232 # backwards compatibility - don't remove 232 # backwards compatibility - don't remove
313 content_encoded = cStringIO.StringIO() 313 content_encoded = cStringIO.StringIO()
314 quopri.encode(content, content_encoded, 0) 314 quopri.encode(content, content_encoded, 0)
315 content_encoded = content_encoded.getvalue() 315 content_encoded = content_encoded.getvalue()
316 316
317 # get the files for this message 317 # get the files for this message
318 message_files = msgid and messages.get(msgid, 'files') or None 318 if msgid is None:
319 message_files = None
320 else:
321 message_files = messages.get(msgid, 'files')
319 322
320 # make sure the To line is always the same (for testing mostly) 323 # make sure the To line is always the same (for testing mostly)
321 sendto.sort() 324 sendto.sort()
322 325
323 # make sure we have a from address 326 # make sure we have a from address

Roundup Issue Tracker: http://roundup-tracker.org/