From 4374fe294e07590ca6864112844f7bc43b11326d Mon Sep 17 00:00:00 2001 From: hmeland Date: Thu, 1 Jul 1999 11:19:47 +0000 Subject: Fixed problem with MIME bounces not containing any MIME boundaries at all (these used to raise an IndexError). --- Mailman/Bouncer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3-70-g09d2