summaryrefslogtreecommitdiff
path: root/src/mailman/email/message.py
diff options
context:
space:
mode:
authorBarry Warsaw2011-01-02 17:09:11 -0500
committerBarry Warsaw2011-01-02 17:09:11 -0500
commit00e2ef1c318e00cbf0f862ed839f6c7e44b1c0a9 (patch)
tree158da3cac60ec65e8a153c5fd46bee3934eb7b28 /src/mailman/email/message.py
parent0fd3cd5393d319da4111b3e196c03ec67b0b9c66 (diff)
downloadmailman-00e2ef1c318e00cbf0f862ed839f6c7e44b1c0a9.tar.gz
mailman-00e2ef1c318e00cbf0f862ed839f6c7e44b1c0a9.tar.zst
mailman-00e2ef1c318e00cbf0f862ed839f6c7e44b1c0a9.zip
Split member and nonmember moderation.
* member-moderation happens at the same place in the built-in chain that the previously named moderation rule happens. nonmember-moderation happens after all the other normal moderation rules. * Handle unsubscribed nonmember posts. Other changes: * Message.senders now filters out Nones and empty strings. * Various test cleanups and simplifications. * More `address` -> `email` fixes. * Give Link class a useful repr. * Fix a potential UnboundLocalError. * Various other small changes.
Diffstat (limited to 'src/mailman/email/message.py')
-rw-r--r--src/mailman/email/message.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mailman/email/message.py b/src/mailman/email/message.py
index 7b362a6a2..4eb049f17 100644
--- a/src/mailman/email/message.py
+++ b/src/mailman/email/message.py
@@ -144,7 +144,8 @@ class Message(email.message.Message):
field_values = self.get_all(header, [])
senders.extend(address.lower() for (real_name, address)
in email.utils.getaddresses(field_values))
- return senders
+ # Filter out None and the empty string.
+ return [sender for sender in senders if sender]
def get_filename(self, failobj=None):
"""Some MUA have bugs in RFC2231 filename encoding and cause