diff options
author | tkikuchi <> | 2004-10-09 00:41:44 +0000 |
---|---|---|
committer | tkikuchi <> | 2004-10-09 00:41:44 +0000 |
commit | 1e0d89ace5d3dbf34e0669364ba4b6d6fe455c8a (patch) | |
tree | 9d7ed3344f0c077b522c571bc92f617523cc4e95 /Mailman/Archiver | |
parent | 0d4f2ad7808f1c3a26a7d4ccc996801efdffc58c (diff) | |
download | mailman2-1e0d89ace5d3dbf34e0669364ba4b6d6fe455c8a.tar.gz mailman2-1e0d89ace5d3dbf34e0669364ba4b6d6fe455c8a.tar.xz mailman2-1e0d89ace5d3dbf34e0669364ba4b6d6fe455c8a.zip |
[ 789015 ] Archiver.py patch for pipermail URL generation
Diffstat (limited to 'Mailman/Archiver')
-rw-r--r-- | Mailman/Archiver/Archiver.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Mailman/Archiver/Archiver.py b/Mailman/Archiver/Archiver.py index 5c55d697..5130bd28 100644 --- a/Mailman/Archiver/Archiver.py +++ b/Mailman/Archiver/Archiver.py @@ -25,6 +25,7 @@ archival. import os import errno import traceback +import re from cStringIO import StringIO from Mailman import mm_cfg @@ -135,15 +136,15 @@ class Archiver: self.internal_name() + '.mbox') def GetBaseArchiveURL(self): + url = self.GetScriptURL('private', absolute=1) + '/' if self.archive_private: - return self.GetScriptURL('private', absolute=1) + '/' + return url else: - inv = {} - for k, v in mm_cfg.VIRTUAL_HOSTS.items(): - inv[v] = k + hostname = re.match('[^:]*://([^/]*)/.*', url).group(1)\ + or mm_cfg.DEFAULT_URL_HOST url = mm_cfg.PUBLIC_ARCHIVE_URL % { 'listname': self.internal_name(), - 'hostname': inv.get(self.host_name, mm_cfg.DEFAULT_URL_HOST), + 'hostname': hostname } if not url.endswith('/'): url += '/' |