diff options
Diffstat (limited to 'Mailman/Message.py')
| -rw-r--r-- | Mailman/Message.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Mailman/Message.py b/Mailman/Message.py index 31b3df873..ef003ada6 100644 --- a/Mailman/Message.py +++ b/Mailman/Message.py @@ -54,9 +54,18 @@ class Message(rfc822.Message): self.rewindbody() self.body = self.fp.read() - def __str__(self): + def __repr__(self): + """Return the entire reproducible message. + This includes the headers, body, and `unixfrom' line. + """ return self.unixfrom + string.join(self.headers, '') + '\n' + self.body + def __str__(self): + """Return the string representation of the message. + This includes just the standard RFC822 headers and body text. + """ + return string.join(self.headers, '') + '\n' + self.body + def GetSender(self, use_envelope=None): """Return the address considered to be the author of the email. @@ -131,7 +140,7 @@ class Message(rfc822.Message): """ # Calculate a unique name for the queue file - text = str(self) + text = repr(self) filebase = sha.new(text).hexdigest() msgfile = os.path.join(mm_cfg.QUEUE_DIR, filebase + '.msg') dbfile = os.path.join(mm_cfg.QUEUE_DIR, filebase + '.db') |
