summaryrefslogtreecommitdiff
path: root/Mailman/Cgi/private.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Cgi/private.py')
-rw-r--r--Mailman/Cgi/private.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/Mailman/Cgi/private.py b/Mailman/Cgi/private.py
index c52c1adae..b4215a403 100644
--- a/Mailman/Cgi/private.py
+++ b/Mailman/Cgi/private.py
@@ -116,10 +116,11 @@ def isAuthenticated(list_name):
# be displayed with an appropriate message.
global login_attempted
login_attempted=1
- listobj = GetListobj(list_name)
- if not listobj:
- print '\n<P>A list named,', repr(list_name), "was not found."
- return 0
+ try:
+ listobj = GetListobj(list_name)
+ except Errors.MMUnknownListError:
+ print "\n<H3>List", repr(list_name), "not found.</h3>"
+ raise SystemExit
try:
listobj.ConfirmUserPassword( username, password)
except (Errors.MMBadUserError, Errors.MMBadPasswordError):
@@ -153,7 +154,11 @@ def main():
print 'Content-type: text/html\n'
page = PAGE
- listobj = GetListobj(list_name)
+ try:
+ listobj = GetListobj(list_name)
+ except Errors.MMUnknownListError:
+ print "\n<H3>List", repr(list_name), "not found.</h3>"
+ raise SystemExit
if login_attempted:
message = ("Your email address or password were incorrect."
" Please try again.")