From b4bc6fc387cb3f298289aba81cfeaa43d617cdfe Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 12 Dec 2001 21:47:45 +0000 Subject: [PATCH] . Message author's name appears in From: instead of roundup instance name (which still appears in the Reply-To:) . envelope-from is now set to the roundup-admin and not roundup itself so delivery reports aren't sent to roundup (thanks Patrick Ohly) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@457 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 4 ++++ roundup-admin | 23 ++++++++++++++++++++--- roundup/roundupdb.py | 12 ++++++++---- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a352a96..dd83622 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,8 @@ Feature: if there are unsaved changes. A "rollback" removes all changes made during the session (up to the last commit). . Added the "display" command to the admin tool - displays a node's values + . Message author's name appears in From: instead of roundup instance name + (which still appears in the Reply-To:) Fixed: . Lots of bugs, thanks Roché and others on the devel mailing list! @@ -39,6 +41,8 @@ Fixed: . we were assuming database files created by anydbm had the same name, but this is not the case for dbm. We now perform a much better check _and_ cope with the anydbm implementation module changing too! + . envelope-from is now set to the roundup-admin and not roundup itself so + delivery reports aren't sent to roundup (thanks Patrick Ohly) 2001-11-23 - 0.3.0 diff --git a/roundup-admin b/roundup-admin index b9cdc9f..83306f6 100755 --- a/roundup-admin +++ b/roundup-admin @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundup-admin,v 1.51 2001-12-10 00:57:38 richard Exp $ +# $Id: roundup-admin,v 1.52 2001-12-12 21:47:45 richard Exp $ import sys if not hasattr(sys, 'version_info') or sys.version_info[:2] < (2,1): @@ -603,6 +603,11 @@ Command help: # figure the property names to display if len(args) > 1: prop_names = args[1].split(',') + all_props = cl.getprops() + for prop_name in prop_names: + if not all_props.has_key(prop_name): + raise UsageError, '%s has no property "%s"'%(classname, + prop_name) else: prop_names = cl.getprops().keys() @@ -629,8 +634,10 @@ Command help: try: value = str(cl.get(nodeid, name)) except KeyError: - raise UsageError, '%s has no property "%s"'%(classname, - name) + # we already checked if the property is valid - a + # KeyError here means the node just doesn't have a + # value for it + value = '' else: value = str(nodeid) f = '%%-%ds'%width @@ -973,6 +980,16 @@ if __name__ == '__main__': # # $Log: not supported by cvs2svn $ +# Revision 1.51 2001/12/10 00:57:38 richard +# From CHANGES: +# . Added the "display" command to the admin tool - displays a node's values +# . #489760 ] [issue] only subject +# . fixed the doc/index.html to include the quoting in the mail alias. +# +# Also: +# . fixed roundup-admin so it works with transactions +# . disabled the back_anydbm module if anydbm tries to use dumbdbm +# # Revision 1.50 2001/12/02 05:06:16 richard # . We now use weakrefs in the Classes to keep the database reference, so # the close() method on the database is no longer needed. diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 0cec95f..609a626 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.29 2001-12-11 04:50:49 richard Exp $ +# $Id: roundupdb.py,v 1.30 2001-12-12 21:47:45 richard Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -356,8 +356,7 @@ class IssueClass(Class): writer = MimeWriter.MimeWriter(message) writer.addheader('Subject', '[%s%s] %s'%(cn, nodeid, title)) writer.addheader('To', ', '.join(sendto)) - writer.addheader('From', '%s <%s>'%(self.INSTANCE_NAME, - self.ISSUE_TRACKER_EMAIL)) + writer.addheader('From', '%s <%s>'%(authname, self.ISSUE_TRACKER_EMAIL)) writer.addheader('Reply-To', '%s <%s>'%(self.INSTANCE_NAME, self.ISSUE_TRACKER_EMAIL)) writer.addheader('MIME-Version', '1.0') @@ -399,7 +398,9 @@ class IssueClass(Class): # now try to send the message try: smtp = smtplib.SMTP(self.MAILHOST) - smtp.sendmail(self.ISSUE_TRACKER_EMAIL, sendto, message.getvalue()) + # send the message as admin so bounces are sent there instead + # of to roundup + smtp.sendmail(self.ADMIN_EMAIL, sendto, message.getvalue()) except socket.error, value: raise MessageSendError, \ "Couldn't send confirmation email: mailhost %s"%value @@ -491,6 +492,9 @@ class IssueClass(Class): # # $Log: not supported by cvs2svn $ +# Revision 1.29 2001/12/11 04:50:49 richard +# fixed the order of the blank line and '-------' line +# # Revision 1.28 2001/12/10 22:20:01 richard # Enabled transaction support in the bsddb backend. It uses the anydbm code # where possible, only replacing methods where the db is opened (it uses the -- 2.30.2