summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2018-03-25 08:21:07 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2018-04-05 12:31:45 (GMT)
commit163639501c602d42adcad9b5ac5edbddd75d0af8 (patch)
treed124ccd148c7bb7219f3b858c39e54a8f7798c00
parent24e85adc5a7a4ac3b82f9b33a44fefd0141ae7a6 (diff)
downloaddjango-mellon-163639501c602d42adcad9b5ac5edbddd75d0af8.zip
django-mellon-163639501c602d42adcad9b5ac5edbddd75d0af8.tar.gz
django-mellon-163639501c602d42adcad9b5ac5edbddd75d0af8.tar.bz2
python3: always use %s to get user representation in logs
-rw-r--r--mellon/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mellon/views.py b/mellon/views.py
index 76be9ed..263fbad 100644
--- a/mellon/views.py
+++ b/mellon/views.py
@@ -200,7 +200,7 @@ class LoginView(ProfileMixin, LogMixin, View):
if user is not None:
if user.is_active:
utils.login(request, user)
- self.log.info('user %r (NameID is %r) logged in using SAML', unicode(user),
+ self.log.info('user %s (NameID is %r) logged in using SAML', user,
attributes['name_id_content'])
request.session['mellon_session'] = utils.flatten_datetime(attributes)
if ('session_not_on_or_after' in attributes and
@@ -209,7 +209,7 @@ class LoginView(ProfileMixin, LogMixin, View):
utils.get_seconds_expiry(
attributes['session_not_on_or_after']))
else:
- self.log.warning('user %r (NameID is %r) is inactive, login refused', unicode(user),
+ self.log.warning('user %s (NameID is %r) is inactive, login refused', user,
attributes['name_id_content'])
return render(request, 'mellon/inactive_user.html', {
'user': user,