summaryrefslogtreecommitdiff
path: root/Mailman/Queue/CommandRunner.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Queue/CommandRunner.py')
-rw-r--r--Mailman/Queue/CommandRunner.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py
index 60e6be8ac..a7c52ba8b 100644
--- a/Mailman/Queue/CommandRunner.py
+++ b/Mailman/Queue/CommandRunner.py
@@ -70,6 +70,9 @@ class Results:
# Either there was no text/plain part or we ignored some
# non-text/plain parts.
self.results.append(_('Ignoring non-text/plain MIME parts'))
+ if part is None:
+ # E.g the outer Content-Type: was text/html
+ return
body = part.get_payload()
# text/plain parts better have string payloads
assert isinstance(body, StringType) or isinstance(body, UnicodeType)