diff options
author | Mark Sapiro <mark@msapiro.net> | 2015-10-17 19:30:06 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2015-10-17 19:30:06 -0700 |
commit | 2b8a93aad055efe7754ee3f1c93afd588b1d53ff (patch) | |
tree | 37101c8d0febd829d79abf43ac061259357f1f0c /Mailman/MailList.py | |
parent | ac9886b17e0462f70209cc2ee0bc3744dd9bd520 (diff) | |
download | mailman2-2b8a93aad055efe7754ee3f1c93afd588b1d53ff.tar.gz mailman2-2b8a93aad055efe7754ee3f1c93afd588b1d53ff.tar.xz mailman2-2b8a93aad055efe7754ee3f1c93afd588b1d53ff.zip |
Invalid regexps in *_these_nonmembers, subscribe_auto_approval and
ban_list are now logged.
Diffstat (limited to '')
-rwxr-xr-x | Mailman/MailList.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 3acd6294..b76dfa1f 100755 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -1604,9 +1604,19 @@ bad regexp in bounce_matching_header line: %s if re.search(pattern, email, re.IGNORECASE): matched = pattern break - except re.error: + except re.error, e: # BAW: we should probably remove this pattern - pass + # The GUI won't add a bad regexp, but at least log it. + # The following kludge works because the ban_list stuff + # is the only caller with no at_list. + attr_name = at_list or 'ban_list' + syslog('error', + '%s in %s has bad regexp "%s": %s', + attr_name, + self.internal_name(), + pattern, + str(e) + ) elif at_list and pattern.startswith('@'): # XXX Needs to be reviewed for list@domain names. # this refers to the members of another list in this |