From 74c46ac40240390898cb06d007ba7cdff10bfb79 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 11 Jan 2002 22:59:01 +0000 Subject: [PATCH] . #502342 ] pipe interface git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@533 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 3 ++- roundup/mailgw.py | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index adc5a0a..02a98e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,7 @@ This file contains the changes to the Roundup system over time. The entries are given with the most recent entry first. -2002-01-11 - 0.4.0b2 +2002-01-?? - 0.4.0b2 Fixed: . #495392 ] empty nosy -patch . #500574 ] messageid must have format @@ -10,6 +10,7 @@ Fixed: text . missed a "from i18n import _" in date.py . #501690 ] MIGRATION.txt incomplete + . #502342 ] pipe interface 2002-01-08 - 0.4.0b1 Feature: diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 186b069..ec6e176 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -73,7 +73,7 @@ are calling the create() method to create a new node). If an auditor raises an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.49 2002-01-10 06:19:18 richard Exp $ +$Id: mailgw.py,v 1.50 2002-01-11 22:59:01 richard Exp $ ''' @@ -228,8 +228,12 @@ class MailGW: w.addheader(header_name, message.getheader(header_name)) # now attach the message body body = w.startbody(content_type) - message.rewindbody() - body.write(message.fp.read()) + try: + message.rewindbody() + except IOError: + body.write("*** couldn't include message body: read from pipe ***") + else: + body.write(message.fp.read()) # attach the original message to the returned message part = writer.nextpart() @@ -726,6 +730,9 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), # # $Log: not supported by cvs2svn $ +# Revision 1.49 2002/01/10 06:19:18 richard +# followup lines directly after a quoted section were being eaten. +# # Revision 1.48 2002/01/08 04:12:05 richard # Changed message-id format to "<%s.%s.%s%s@%s>" so it complies with RFC822 # -- 2.30.2