Skip to content

Commit

Permalink
Fix for django traceback when logging into the web interface with a b…
Browse files Browse the repository at this point in the history
…ad username and/or password
  • Loading branch information
jimi-c committed Mar 30, 2011
1 parent 41a92b1 commit 7948418
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/cobbler_web/views.py
Expand Up @@ -1137,7 +1137,11 @@ def do_login(request):

remote = xmlrpclib.Server(url_cobbler_api, allow_none=True)

token = remote.login(username, password)
try:
token = remote.login(username, password)
except:
token = None

if token:
request.session['username'] = username
request.session['token'] = token
Expand Down

0 comments on commit 7948418

Please sign in to comment.