diff options
author | bwarsaw <> | 2005-05-13 02:34:39 +0000 |
---|---|---|
committer | bwarsaw <> | 2005-05-13 02:34:39 +0000 |
commit | 9dd0d69317e7144abbc410078a4d67b5701cef43 (patch) | |
tree | aaa8e34974aaf3d0049f697e516ee7c2ef1dfbb4 /Mailman/Archiver/HyperArch.py | |
parent | 7e13838af8d2975cb81e72d009d35b4f9cd111eb (diff) | |
download | mailman2-9dd0d69317e7144abbc410078a4d67b5701cef43.tar.gz mailman2-9dd0d69317e7144abbc410078a4d67b5701cef43.tar.xz mailman2-9dd0d69317e7144abbc410078a4d67b5701cef43.zip |
strip_subject() in HyperArch.py
prefix_subject() in CookHeaders.py
When calling re.sub() to substitute the subject prefix, you have to escape
the pattern, otherwise prefixes like [C++] cause "multiple repeat"
exceptions in re.
Also, whitespace normalization and copyright years updates.
Diffstat (limited to 'Mailman/Archiver/HyperArch.py')
-rw-r--r-- | Mailman/Archiver/HyperArch.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py index 5a37adad..c6a2ff0e 100644 --- a/Mailman/Archiver/HyperArch.py +++ b/Mailman/Archiver/HyperArch.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2005 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -412,7 +412,7 @@ class Article(pipermail.Article): if prefix: prefix_pat = re.sub(r'%\d*d', r'\s*\d+\s*', prefix) prefix_pat = re.sub('([\[\(\{\)])', '\\\\\g<1>', prefix_pat) - subject = re.sub(prefix_pat, '', subject) + subject = re.sub(re.escape(prefix_pat), '', subject) subject = subject.lstrip() strip_pat = re.compile('^((RE|AW|SV)(\[\d+\])?:\s*)+', re.I) stripped = strip_pat.sub('', subject) @@ -585,7 +585,7 @@ class Article(pipermail.Article): try: del self.html_body except AttributeError: - pass + pass class HyperArchive(pipermail.T): |