diff options
| author | bwarsaw | 2000-09-27 20:04:43 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-09-27 20:04:43 +0000 |
| commit | dc92b491038da118651d5ecdfbe9c5171b51305d (patch) | |
| tree | edca50b5d86fe4f4282ad5a66edcb0fb6f267905 | |
| parent | 96bbfb54c5d3a43017b254c38407de7c6266a72f (diff) | |
| download | mailman-dc92b491038da118651d5ecdfbe9c5171b51305d.tar.gz mailman-dc92b491038da118651d5ecdfbe9c5171b51305d.tar.zst mailman-dc92b491038da118651d5ecdfbe9c5171b51305d.zip | |
AppendMessage(): Since we can't portably test the numeric/symbolic
error code raised by seek()ing before the end of a non-existant or
zero length file, we simply ignore all IOErrors that can result.
| -rw-r--r-- | Mailman/Mailbox.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Mailman/Mailbox.py b/Mailman/Mailbox.py index 4edad7e78..3eb47d6c3 100644 --- a/Mailman/Mailbox.py +++ b/Mailman/Mailbox.py @@ -40,8 +40,9 @@ class Mailbox(mailbox.UnixMailbox): try: self.fp.seek(-1, 2) except IOError, e: - if e.errno <> errno.EINVAL: raise - # the file must be empty + # Assume the file is empty. We can't portably test the error code + # returned, since it differs per platform. + pass else: if self.fp.read(1) <> '\n': self.fp.write('\n') |
