From 4cbc8bc2ebceac99948f1e6a050afaa266d63e9e Mon Sep 17 00:00:00 2001 From: klm Date: Fri, 10 Apr 1998 21:13:37 +0000 Subject: .GetBaseArchiveURL(): Function instead of _base_archive_url member var - the value is dependent on the value of another setting, self.private_archive, so must be a func. --- Mailman/Archiver.py | 13 +++++++++---- modules/mm_archive.py | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Mailman/Archiver.py b/Mailman/Archiver.py index 0b7113fcf..474d4c2a0 100644 --- a/Mailman/Archiver.py +++ b/Mailman/Archiver.py @@ -4,7 +4,7 @@ Public archives are separated from private ones. An external archival mechanism (eg, pipermail) should be pointed to the right places, to do the archival.""" -__version__ = "$Revision: 394 $" +__version__ = "$Revision: 421 $" import sys, os, string import mm_utils, mm_mbox, mm_cfg, mm_message @@ -36,11 +36,16 @@ class Archiver: ## mm_cfg.DEFAULT_ARCHIVE_RETAIN_TEXT_COPY # Not configurable - # XXX klm - reconcile with .ArchiveFileName() - self._base_archive_url = os.path.join(mm_cfg.ARCHIVE_URL, - self._internal_name + ".html") self.clobber_date = 0 + def GetBaseArchiveURL(self): + if self.archive_private: + return os.path.join(mm_cfg.PRIVATE_ARCHIVE_URL, + self._internal_name + ".html") + else: + return os.path.join(mm_cfg.PUBLIC_ARCHIVE_URL, + self._internal_name + ".html") + def GetConfigInfo(self): return [ "List traffic archival policies.", diff --git a/modules/mm_archive.py b/modules/mm_archive.py index 0b7113fcf..474d4c2a0 100644 --- a/modules/mm_archive.py +++ b/modules/mm_archive.py @@ -4,7 +4,7 @@ Public archives are separated from private ones. An external archival mechanism (eg, pipermail) should be pointed to the right places, to do the archival.""" -__version__ = "$Revision: 394 $" +__version__ = "$Revision: 421 $" import sys, os, string import mm_utils, mm_mbox, mm_cfg, mm_message @@ -36,11 +36,16 @@ class Archiver: ## mm_cfg.DEFAULT_ARCHIVE_RETAIN_TEXT_COPY # Not configurable - # XXX klm - reconcile with .ArchiveFileName() - self._base_archive_url = os.path.join(mm_cfg.ARCHIVE_URL, - self._internal_name + ".html") self.clobber_date = 0 + def GetBaseArchiveURL(self): + if self.archive_private: + return os.path.join(mm_cfg.PRIVATE_ARCHIVE_URL, + self._internal_name + ".html") + else: + return os.path.join(mm_cfg.PUBLIC_ARCHIVE_URL, + self._internal_name + ".html") + def GetConfigInfo(self): return [ "List traffic archival policies.", -- cgit v1.3.1