Skip to content

Commit

Permalink
Remove except block that does nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit committed Feb 21, 2024
1 parent ba430bc commit 6a85ed6
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions python/nav/web/webfront/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,11 @@ def do_login(request):
LogEntry.add_log_entry(
account, 'log-in', '{actor} logged in', before=account
)

try:
auth.set_request_account(request, account)
except ldap.Error as error:
errors.append('Error while talking to LDAP:\n%s' % error)
else:
_logger.info("%s successfully logged in", account.login)
if not origin:
origin = reverse('webfront-index')
return HttpResponseRedirect(origin)
auth.set_request_account(request, account)
_logger.info("%s successfully logged in", account.login)
if not origin:
origin = reverse('webfront-index')
return HttpResponseRedirect(origin)
else:
_logger.info("failed login: %r", username)
errors.append(
Expand Down

0 comments on commit 6a85ed6

Please sign in to comment.