summaryrefslogtreecommitdiff
path: root/Mailman/Cgi/private.py
diff options
context:
space:
mode:
authorbwarsaw1999-05-02 03:40:04 +0000
committerbwarsaw1999-05-02 03:40:04 +0000
commitb3d14ad6254fde04531b336b8cc994a4ac7319f5 (patch)
treef1d49ebb3f36941297173bd62ac6cd367b4146c2 /Mailman/Cgi/private.py
parent140912a7b5c834bf843f907548a7334308a3db05 (diff)
downloadmailman-b3d14ad6254fde04531b336b8cc994a4ac7319f5.tar.gz
mailman-b3d14ad6254fde04531b336b8cc994a4ac7319f5.tar.zst
mailman-b3d14ad6254fde04531b336b8cc994a4ac7319f5.zip
Diffstat (limited to 'Mailman/Cgi/private.py')
-rw-r--r--Mailman/Cgi/private.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Mailman/Cgi/private.py b/Mailman/Cgi/private.py
index b6dbd0b49..a52af90f2 100644
--- a/Mailman/Cgi/private.py
+++ b/Mailman/Cgi/private.py
@@ -26,6 +26,7 @@ import sys, os, string
from Mailman import MailList, Errors
from Mailman import Cookie
from Mailman.Logging.Utils import LogStdErr
+from Mailman import Utils
import Mailman.mm_cfg
LogStdErr("error", "private")
@@ -72,11 +73,6 @@ PAGE = '''
login_attempted = 0
_list = None
-def getListName(path):
- component = string.split(path, os.sep)[1]
- root, ext = os.path.splitext(component)
- return root
-
def GetListobj(list_name):
"""Return an unlocked instance of the named maillist, if found."""
global _list
@@ -149,7 +145,11 @@ def main():
true_filename = os.path.join(
Mailman.mm_cfg.PRIVATE_ARCHIVE_FILE_DIR,
true_path(path))
- list_name = getListName(path)
+ list_info = Utils.GetPathPieces(path)
+ if len(list_info) == 0:
+ list_name = None
+ else:
+ list_name = string.lower(list_info[0])
# If it's a directory, we have to append index.html in this script. We
# must also check for a gzipped file, because the text archives are