diff --git a/mode/mbox.py b/mode/mbox.py index c229234..99025d9 100644 --- a/mode/mbox.py +++ b/mode/mbox.py @@ -52,7 +52,7 @@ class MboxMsgBuffer(Buffer): def _get_lines(self): d = {} for name in ('delivered-to', 'to', 'from', 'subject', 'date'): - s = self.msg.get(name) + s = self.msg.get(name, '') d[name] = cont_re.sub(' ', s.replace('\t', ' ')) lines = [ 'Delivered-To: ' + d['delivered-to'],