diff options
| author | bwarsaw | 2000-04-04 23:12:50 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-04-04 23:12:50 +0000 |
| commit | 97d0cd927eb108d6970fa7e973e8be89c439c2eb (patch) | |
| tree | ff3c814fe7000725a87c2625e4e3e5089ad9a485 /Mailman/Cgi/roster.py | |
| parent | 85ff1df49be81af31a33f466ac7ab424fe00cad8 (diff) | |
| download | mailman-97d0cd927eb108d6970fa7e973e8be89c439c2eb.tar.gz mailman-97d0cd927eb108d6970fa7e973e8be89c439c2eb.tar.zst mailman-97d0cd927eb108d6970fa7e973e8be89c439c2eb.zip | |
Diffstat (limited to 'Mailman/Cgi/roster.py')
| -rw-r--r-- | Mailman/Cgi/roster.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Mailman/Cgi/roster.py b/Mailman/Cgi/roster.py index 66f3d1da5..cdb9dfbcb 100644 --- a/Mailman/Cgi/roster.py +++ b/Mailman/Cgi/roster.py @@ -79,7 +79,6 @@ def main(): def get_list(): "Return list or bail out with error page." - list_info = [] try: list_info = Utils.GetPathPieces(os.environ['PATH_INFO']) @@ -88,20 +87,21 @@ def get_list(): if len(list_info) != 1: error_page("Invalid options to CGI script.") sys.exit(0) - list_name = string.lower(list_info[0]) + listname = string.lower(list_info[0]) try: - list = MailList.MailList(list_name, lock = 0) - except Errors.MMUnknownListError: - error_page("%s: No such list.", list_name) - sys.exit(0) - if not list._ready: - error_page("%s: No such list.", list_name) + mlist = MailList.MailList(listname, lock=0) + mlist.IsListInitialized() + except Errors.MMListError, e: + error_page('No such list <em>%s</em>' % listname) + sys.stderr.write('No such list "%s": %s\n' % (listname, e)) sys.exit(0) - return list + return mlist + def error_page(errmsg, *args): print apply(error_page_doc, (errmsg,) + args).Format() + def error_page_doc(errmsg, *args): """Produce a simple error-message page on stdout and exit. |
