diff options
| -rw-r--r-- | Mailman/Cgi/edithtml.py | 7 | ||||
| -rw-r--r-- | Mailman/Cgi/private.py | 11 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Mailman/Cgi/edithtml.py b/Mailman/Cgi/edithtml.py index 8e9532951..ca9b738a6 100644 --- a/Mailman/Cgi/edithtml.py +++ b/Mailman/Cgi/edithtml.py @@ -18,7 +18,6 @@ import os import cgi -import string import gettext from Mailman import Utils @@ -35,8 +34,8 @@ from Mailman.i18n import _ def main(): # Trick out pygettext since we want to mark template_data as translatable, # but we don't want to actually translate it here. - def _(string): - return string + def _(s): + return s template_data = ( ('listinfo.html', _('General list information page')), @@ -55,7 +54,7 @@ def main(): print doc.Format(bgcolor='#ffffff') return - listname = string.lower(parts[0]) + listname = parts[0].lower() try: mlist = MailList.MailList(listname, lock=0) except Errors.MMListError, e: diff --git a/Mailman/Cgi/private.py b/Mailman/Cgi/private.py index 444d2ee11..e727bcf7a 100644 --- a/Mailman/Cgi/private.py +++ b/Mailman/Cgi/private.py @@ -20,7 +20,10 @@ Currently this is organized to obtain passwords for Mailman mailing list subscribers. """ -import sys, os, string, cgi +import sys +import os +import cgi + from Mailman import Utils, MailList, Errors from Mailman.htmlformat import * from Mailman.Logging.Utils import LogStdErr @@ -35,8 +38,8 @@ _list = None def true_path(path): "Ensure that the path is safe by removing .." - path = string.replace(path, "../", "") - path = string.replace(path, "./", "") + path = path.replace('../', '') + path = path.replace('./', '') return path[1:] @@ -62,7 +65,7 @@ def main(): mm_cfg.PRIVATE_ARCHIVE_FILE_DIR, true_path(path)) - listname = string.lower(parts[0]) + listname = parts[0].lower() mboxfile = '' if len(parts) > 1: mboxfile = parts[1] |
