Update of /cvsroot/mailman/mailman/Mailman/Archiver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31782/Mailman/Archiver
Modified Files:
Tag: Release_2_1-maint
HyperArch.py
Log Message:
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.
Index: HyperArch.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Archiver/HyperArch.py,v
retrieving revision 2.37.2.11
retrieving revision 2.37.2.12
diff -u -d -r2.37.2.11 -r2.37.2.12
--- HyperArch.py 21 Apr 2005 04:13:12 -0000 2.37.2.11
+++ HyperArch.py 13 May 2005 02:34:39 -0000 2.37.2.12
@@ -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 @@
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 @@
try:
del self.html_body
except AttributeError:
- pass
+ pass
class HyperArchive(pipermail.T):
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org