Skip to content
Prev Previous commit
Next Next commit
Use a proper Exception and not NotImplemented
  • Loading branch information
liquidpele authored Apr 10, 2017
commit 7cf6f7970e4c1b52bdfb89792cb4176d84a888f1
4 changes: 2 additions & 2 deletions djangosaml2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def login(request,
except UnsupportedBinding as e:
logger.error('%s: sp_authn_requests_signed=%s and dictates the binding chosen, ensure it matches what the IDP metadata allows' % (
e, getattr(conf, '_sp_authn_requests_signed', False)))
raise NotImplementedError('Unsupported binding: %s', binding)
raise

logger.debug('Saving the session_id in the OutstandingQueries cache')
oq_cache = OutstandingQueriesCache(request.session)
Expand All @@ -193,7 +193,7 @@ def login(request,
except TemplateDoesNotExist:
return HttpResponse(result['data'])
else:
raise NotImplementedError('Unsupported binding: %s', binding)
raise UnsupportedBinding('Unsupported binding: %s', binding)


@require_POST
Expand Down