comparison roundup/roundupdb.py @ 1949:3fa6df0d120d

must be backward-compatible to py2.1
author Richard Jones <richard@users.sourceforge.net>
date Fri, 05 Dec 2003 04:43:30 +0000
parents 7c1ddebe7589
children fc52d57c6c3e
comparison
equal deleted inserted replaced
1947:0e19e99075e3 1949:3fa6df0d120d
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.95 2003-11-16 20:01:16 jlgijsbers Exp $ 18 # $Id: roundupdb.py,v 1.96 2003-12-05 04:43:30 richard Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Extending hyperdb with types specific to issue-tracking. 21 Extending hyperdb with types specific to issue-tracking.
22 """ 22 """
23 from __future__ import nested_scopes 23 from __future__ import nested_scopes
135 """ 135 """
136 authid = self.db.msg.safeget(msgid, 'author') 136 authid = self.db.msg.safeget(msgid, 'author')
137 recipients = self.db.msg.safeget(msgid, 'recipients', []) 137 recipients = self.db.msg.safeget(msgid, 'recipients', [])
138 138
139 sendto = [] 139 sendto = []
140 seen_message = dict([(recipient, 1) for recipient in recipients]) 140 seen_message = {}
141 141 for recipient in recipients:
142 seen_message[recipient] = 1
143
142 def add_recipient(userid): 144 def add_recipient(userid):
143 # make sure they have an address 145 # make sure they have an address
144 address = self.db.user.get(userid, 'address') 146 address = self.db.user.get(userid, 'address')
145 if address: 147 if address:
146 sendto.append(address) 148 sendto.append(address)

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