Skip to content

Commit 8fd91c0

Browse files
author
Richard Jones
committed
Make the mail parser a little more robust.
1 parent 918a24d commit 8fd91c0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roundup/mailgw.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class node. Any parts of other types are each stored in separate files
7272
an exception, the original message is bounced back to the sender with the
7373
explanatory message given in the exception.
7474
75-
$Id: mailgw.py,v 1.13 2001-08-12 06:32:36 richard Exp $
75+
$Id: mailgw.py,v 1.14 2001-08-13 23:02:54 richard Exp $
7676
'''
7777

7878

@@ -167,7 +167,7 @@ def handle_message(self, message):
167167
Parse the message as per the module docstring.
168168
'''
169169
# handle the subject line
170-
subject = message.getheader('subject')
170+
subject = message.getheader('subject', '')
171171
m = subject_re.match(subject)
172172
if not m:
173173
raise MailUsageError, '''
@@ -398,6 +398,9 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'),
398398

399399
#
400400
# $Log: not supported by cvs2svn $
401+
# Revision 1.13 2001/08/12 06:32:36 richard
402+
# using isinstance(blah, Foo) now instead of isFooType
403+
#
401404
# Revision 1.12 2001/08/08 01:27:00 richard
402405
# Added better error handling to mailgw.
403406
#

0 commit comments

Comments
 (0)