diff options
| author | hmeland | 1999-07-01 11:19:47 +0000 |
|---|---|---|
| committer | hmeland | 1999-07-01 11:19:47 +0000 |
| commit | 4374fe294e07590ca6864112844f7bc43b11326d (patch) | |
| tree | 55b9632e1a69e0a54db8a0adbb6d24754a051f7a | |
| parent | ae2ff07b77795502dea0fb38d473f704f4b2d17a (diff) | |
| download | mailman-4374fe294e07590ca6864112844f7bc43b11326d.tar.gz mailman-4374fe294e07590ca6864112844f7bc43b11326d.tar.zst mailman-4374fe294e07590ca6864112844f7bc43b11326d.zip | |
Fixed problem with MIME bounces not containing any MIME boundaries at
all (these used to raise an IndexError).
| -rw-r--r-- | Mailman/Bouncer.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py index 2c70e2602..5b5ee33cf 100644 --- a/Mailman/Bouncer.py +++ b/Mailman/Bouncer.py @@ -332,7 +332,12 @@ class Bouncer: '"[^"]+"')[1][1:-1] if boundry: - relevant_text = string.split(msg.body, '--%s' % boundry)[1] + relevant_text = string.split(msg.body, '--%s' % boundry) + # Invalid MIME messages shouldn't cause exceptions + if len(relevant_text) >= 2: + relevant_text = relevant_text[1] + else: + relevant_text = relevant_text[0] else: # This looks strange, but at least 2 are going to be no-ops. relevant_text = regsub.split(msg.body, |
