summaryrefslogtreecommitdiff
path: root/Mailman/Archiver/Archiver.py
diff options
context:
space:
mode:
authorbwarsaw2002-01-02 01:58:27 +0000
committerbwarsaw2002-01-02 01:58:27 +0000
commite1f35c47ec8e8450cb2fd6db346b6fe51b76c93c (patch)
treefa489fae33794ba1f711b5aa5ba763082e25b0ed /Mailman/Archiver/Archiver.py
parentf7ce675606f4abfed8170e975244467106a6d56a (diff)
downloadmailman-e1f35c47ec8e8450cb2fd6db346b6fe51b76c93c.tar.gz
mailman-e1f35c47ec8e8450cb2fd6db346b6fe51b76c93c.tar.zst
mailman-e1f35c47ec8e8450cb2fd6db346b6fe51b76c93c.zip
Diffstat (limited to 'Mailman/Archiver/Archiver.py')
-rw-r--r--Mailman/Archiver/Archiver.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/Mailman/Archiver/Archiver.py b/Mailman/Archiver/Archiver.py
index 6f5e24321..820167d81 100644
--- a/Mailman/Archiver/Archiver.py
+++ b/Mailman/Archiver/Archiver.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001,2002 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
@@ -31,6 +31,7 @@ from cStringIO import StringIO
from Mailman import mm_cfg
from Mailman import Mailbox
from Mailman import LockFile
+from Mailman import Utils
from Mailman.SafeDict import SafeDict
from Mailman.Logging.Syslog import syslog
from Mailman.i18n import _
@@ -89,9 +90,22 @@ class Archiver:
omask = os.umask(0)
try:
try:
+ listname = self.internal_name();
os.mkdir(self.archive_dir()+'.mbox', 02775)
+ # We also create an empty pipermail archive directory
+ # (pipermail would create it, but in the meantime lists with
+ # no archives return errors when you browse the non existant
+ # archive dir). -- Marc
+ os.mkdir(self.archive_dir(), 02775)
except OSError, e:
if e.errno <> errno.EEXIST: raise
+ fp = open(os.path.join(self.archive_dir(), 'index.html'), 'w')
+ fp.write(Utils.maketext(
+ 'emptyarchive.html',
+ {'listname': self.real_name,
+ 'listinfo': self.GetScriptURL('listinfo', absolute=1),
+ }, mlist=self))
+ fp.close()
finally:
os.umask(omask)