From: neaj Date: Wed, 25 Jun 2003 08:02:51 +0000 (+0000) Subject: The .replace in getheader would fail for absent headers (that return X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=532f94f822feb1cc66a4150705ec394f83c19fdc;p=roundup.git The .replace in getheader would fail for absent headers (that return None). git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1779 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 13a7f93..f71e63f 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.125 2003-06-24 12:39:20 neaj Exp $ +$Id: mailgw.py,v 1.126 2003-06-25 08:02:51 neaj Exp $ ''' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -186,7 +186,8 @@ class Message(mimetools.Message): def getheader(self, name, default=None): hdr = mimetools.Message.getheader(self, name, default) - hdr = hdr.replace('\n','') # Inserted by rfc822.readheaders + if hdr: + hdr = hdr.replace('\n','') # Inserted by rfc822.readheaders return rfc2822.decode_header(hdr) class MailGW: