diff options
| author | Barry Warsaw | 2011-02-25 18:15:58 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2011-02-25 18:15:58 -0500 |
| commit | db2777e4aea3b516906a9500a0156d388779292e (patch) | |
| tree | 6d08a6660226c3d55dd75dae2c20a05680884255 /src/mailman/Utils.py | |
| parent | 51140e885c9e1dc074e1fb3f288f50a8e9add884 (diff) | |
| download | mailman-db2777e4aea3b516906a9500a0156d388779292e.tar.gz mailman-db2777e4aea3b516906a9500a0156d388779292e.tar.zst mailman-db2777e4aea3b516906a9500a0156d388779292e.zip | |
Eliminate Utils.get_pattern() and in the process, completely revamp
subscription bans so as not to have to rely on BLOBS or pickles in the
database.
Also, be sure to include .rst files in both doctests and in the packaged
tarballs. With the now awesome reST mode for Emacs, I plan to rename all .txt
doctest files to .rst.
Diffstat (limited to '')
| -rw-r--r-- | src/mailman/Utils.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/mailman/Utils.py b/src/mailman/Utils.py index 49b7d082e..e10a9fde5 100644 --- a/src/mailman/Utils.py +++ b/src/mailman/Utils.py @@ -407,29 +407,3 @@ def strip_verbose_pattern(pattern): newpattern += c i += 1 return newpattern - - - -def get_pattern(email, pattern_list): - """Returns matched entry in pattern_list if email matches. - Otherwise returns None. - """ - if not pattern_list: - return None - matched = None - for pattern in pattern_list: - if pattern.startswith('^'): - # This is a regular expression match - try: - if re.search(pattern, email, re.IGNORECASE): - matched = pattern - break - except re.error: - # BAW: we should probably remove this pattern - pass - else: - # Do the comparison case insensitively - if pattern.lower() == email.lower(): - matched = pattern - break - return matched |
