diff options
| author | bwarsaw | 2000-05-31 19:52:41 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-05-31 19:52:41 +0000 |
| commit | 35f07600923e93f2e7b42a82fbd6c2104e523207 (patch) | |
| tree | 1d5cceeab0350333322fb3baa65347da96288e64 /Mailman/Message.py | |
| parent | a478747521a88e8b42ef88b6b677382d860e80ad (diff) | |
| download | mailman-35f07600923e93f2e7b42a82fbd6c2104e523207.tar.gz mailman-35f07600923e93f2e7b42a82fbd6c2104e523207.tar.zst mailman-35f07600923e93f2e7b42a82fbd6c2104e523207.zip | |
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') |
