diff options
| author | bwarsaw | 2001-10-09 23:14:22 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-10-09 23:14:22 +0000 |
| commit | e7bea1efd0b4c221886cace8a49adbd99f6b1a8b (patch) | |
| tree | 7658117d67120fd4b2980bc57d5c1a53cc325241 | |
| parent | 69ee66cb158155e6bd6abad1a1399a6a567cf82a (diff) | |
| download | mailman-e7bea1efd0b4c221886cace8a49adbd99f6b1a8b.tar.gz mailman-e7bea1efd0b4c221886cace8a49adbd99f6b1a8b.tar.zst mailman-e7bea1efd0b4c221886cace8a49adbd99f6b1a8b.zip | |
HasExplicitDest(), hasMatchingHeader(): Pass a failobj of [] to the
get_all() call so that even if the field is missing, we get a
valid list object.
| -rw-r--r-- | Mailman/MailList.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 1149ef51d..e975f7414 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -936,7 +936,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, # specifically To: Cc: and Resent-to: to = [] for header in ('to', 'cc', 'resent-to', 'resent-cc'): - to.extend(getaddresses(msg.get_all(header))) + to.extend(getaddresses(msg.get_all(header, []))) for fullname, addr in to: # It's possible that if the header doesn't have a valid # (i.e. RFC822) value, we'll get None for the address. So skip @@ -1024,7 +1024,7 @@ bad regexp in bounce_matching_header line: %s matches. """ for header, cre, line in self.parse_matching_header_opt(): - for value in msg.get_all(header): + for value in msg.get_all(header, []): if cre.search(value): return line return 0 |
