summaryrefslogtreecommitdiff
path: root/Mailman/Cgi/roster.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-07-14 21:23:28 -0400
committerBarry Warsaw2007-07-14 21:23:28 -0400
commit327865eaf118f40063366acad9c7d97487e010d6 (patch)
treeeda494bb7560b1427813ae7ec51a22e3d0444703 /Mailman/Cgi/roster.py
parent288ae405b09baa443eb1b39422c48c315fbb2e5a (diff)
downloadmailman-327865eaf118f40063366acad9c7d97487e010d6.tar.gz
mailman-327865eaf118f40063366acad9c7d97487e010d6.tar.zst
mailman-327865eaf118f40063366acad9c7d97487e010d6.zip
Other than contrib files, convert all imports of mm_cfg to imports of config.
Ignore mailman.egg-info In bin/make_instance.py: Catch and ignore import errors when importing Mailman.i18n. Before this script has actually been run, there won't be enough infrastructure in place of the import to succeed. Include several other fixes in this file. Add install_requires to the setup script.
Diffstat (limited to 'Mailman/Cgi/roster.py')
-rw-r--r--Mailman/Cgi/roster.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/Mailman/Cgi/roster.py b/Mailman/Cgi/roster.py
index 41febbab0..fdeb83d31 100644
--- a/Mailman/Cgi/roster.py
+++ b/Mailman/Cgi/roster.py
@@ -30,15 +30,15 @@ import urllib
import logging
from Mailman import Errors
-from Mailman import i18n
from Mailman import MailList
-from Mailman import mm_cfg
from Mailman import Utils
+from Mailman import i18n
+from Mailman.configuration import config
from Mailman.htmlformat import *
# Set up i18n
_ = i18n._
-i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
+i18n.set_language(config.DEFAULT_SERVER_LANGUAGE)
log = logging.getLogger('mailman.error')
@@ -80,17 +80,17 @@ def main():
# Members only
addr = cgidata.getvalue('roster-email', '')
password = cgidata.getvalue('roster-pw', '')
- ok = mlist.WebAuthenticate((mm_cfg.AuthUser,
- mm_cfg.AuthListModerator,
- mm_cfg.AuthListAdmin,
- mm_cfg.AuthSiteAdmin),
+ ok = mlist.WebAuthenticate((config.AuthUser,
+ config.AuthListModerator,
+ config.AuthListAdmin,
+ config.AuthSiteAdmin),
password, addr)
else:
# Admin only, so we can ignore the address field
password = cgidata.getvalue('roster-pw', '')
- ok = mlist.WebAuthenticate((mm_cfg.AuthListModerator,
- mm_cfg.AuthListAdmin,
- mm_cfg.AuthSiteAdmin),
+ ok = mlist.WebAuthenticate((config.AuthListModerator,
+ config.AuthListAdmin,
+ config.AuthSiteAdmin),
password)
if not ok:
realname = mlist.real_name
@@ -117,7 +117,7 @@ def main():
def error_page(errmsg):
doc = Document()
- doc.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
+ doc.set_language(config.DEFAULT_SERVER_LANGUAGE)
error_page_doc(doc, errmsg)
print doc.Format()