Mercurial > p > roundup > code
comparison roundup/roundupdb.py @ 416:26a4910ef80e
oops
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 27 Nov 2001 03:17:13 +0000 |
| parents | fc6d03e9dbc1 |
| children | fc907b6ef135 |
comparison
equal
deleted
inserted
replaced
| 415:105a052508a0 | 416:26a4910ef80e |
|---|---|
| 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.22 2001-11-27 03:00:50 richard Exp $ | 18 # $Id: roundupdb.py,v 1.23 2001-11-27 03:17:13 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 | 23 |
| 321 authname = self.db.user.get(authid, 'realname') | 321 authname = self.db.user.get(authid, 'realname') |
| 322 if not authname: | 322 if not authname: |
| 323 authname = self.db.user.get(authid, 'username') | 323 authname = self.db.user.get(authid, 'username') |
| 324 authaddr = self.db.user.get(authid, 'address') | 324 authaddr = self.db.user.get(authid, 'address') |
| 325 if authaddr: | 325 if authaddr: |
| 326 authaddr = '<%s> '%authaddr | 326 authaddr = ' <%s>'%authaddr |
| 327 else: | 327 else: |
| 328 authaddr = '' | 328 authaddr = '' |
| 329 # make the message body | 329 # make the message body |
| 330 m = [''] | 330 m = [''] |
| 331 | 331 |
| 333 if self.EMAIL_SIGNATURE_POSITION == 'top': | 333 if self.EMAIL_SIGNATURE_POSITION == 'top': |
| 334 m.append(self.email_signature(nodeid, msgid)) | 334 m.append(self.email_signature(nodeid, msgid)) |
| 335 | 335 |
| 336 # add author information | 336 # add author information |
| 337 if len(self.db.issue.get(nodeid, 'messages')) == 1: | 337 if len(self.db.issue.get(nodeid, 'messages')) == 1: |
| 338 m.append("New submission from %s <%s>:"%(authname, authaddr)) | 338 m.append("New submission from %s%s:"%(authname, authaddr)) |
| 339 else: | 339 else: |
| 340 m.append("%s <%s> added the comment:"%(authname, authaddr)) | 340 m.append("%s%s added the comment:"%(authname, authaddr)) |
| 341 m.append('') | 341 m.append('') |
| 342 | 342 |
| 343 # add the content | 343 # add the content |
| 344 m.append(self.db.msg.get(msgid, 'content')) | 344 m.append(self.db.msg.get(msgid, 'content')) |
| 345 | 345 |
| 414 line = '_' * max(len(web), len(email)) | 414 line = '_' * max(len(web), len(email)) |
| 415 return '%s\n%s\n%s\n%s'%(line, email, web, line) | 415 return '%s\n%s\n%s\n%s'%(line, email, web, line) |
| 416 | 416 |
| 417 # | 417 # |
| 418 # $Log: not supported by cvs2svn $ | 418 # $Log: not supported by cvs2svn $ |
| 419 # Revision 1.22 2001/11/27 03:00:50 richard | |
| 420 # couple of bugfixes from latest patch integration | |
| 421 # | |
| 419 # Revision 1.21 2001/11/26 22:55:56 richard | 422 # Revision 1.21 2001/11/26 22:55:56 richard |
| 420 # Feature: | 423 # Feature: |
| 421 # . Added INSTANCE_NAME to configuration - used in web and email to identify | 424 # . Added INSTANCE_NAME to configuration - used in web and email to identify |
| 422 # the instance. | 425 # the instance. |
| 423 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup | 426 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup |
