Skip to content

Commit a78ff9c

Browse files
author
Richard Jones
committed
[SF#502342] pipe interface
1 parent 3b3df42 commit a78ff9c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CHANGES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4-
2002-01-11 - 0.4.0b2
4+
2002-01-?? - 0.4.0b2
55
Fixed:
66
. #495392 ] empty nosy -patch
77
. #500574 ] messageid must have format <part1@part2>
@@ -10,6 +10,7 @@ Fixed:
1010
text
1111
. missed a "from i18n import _" in date.py
1212
. #501690 ] MIGRATION.txt incomplete
13+
. #502342 ] pipe interface
1314

1415
2002-01-08 - 0.4.0b1
1516
Feature:

roundup/mailgw.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.49 2002-01-10 06:19:18 richard Exp $
76+
$Id: mailgw.py,v 1.50 2002-01-11 22:59:01 richard Exp $
7777
'''
7878

7979

@@ -228,8 +228,12 @@ def bounce_message(self, message, sendto, error,
228228
w.addheader(header_name, message.getheader(header_name))
229229
# now attach the message body
230230
body = w.startbody(content_type)
231-
message.rewindbody()
232-
body.write(message.fp.read())
231+
try:
232+
message.rewindbody()
233+
except IOError:
234+
body.write("*** couldn't include message body: read from pipe ***")
235+
else:
236+
body.write(message.fp.read())
233237

234238
# attach the original message to the returned message
235239
part = writer.nextpart()
@@ -726,6 +730,9 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'),
726730

727731
#
728732
# $Log: not supported by cvs2svn $
733+
# Revision 1.49 2002/01/10 06:19:18 richard
734+
# followup lines directly after a quoted section were being eaten.
735+
#
729736
# Revision 1.48 2002/01/08 04:12:05 richard
730737
# Changed message-id format to "<%s.%s.%s%s@%s>" so it complies with RFC822
731738
#

0 commit comments

Comments
 (0)