Skip to content

Commit 4c259f8

Browse files
ReeceReece
authored andcommitted
Use logger variable arguments
1 parent 675dc38 commit 4c259f8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

djangosaml2/views.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,21 @@ def login(request,
163163
# ensure our selected binding is supported by the IDP
164164
supported_bindings = get_idp_sso_supported_bindings(selected_idp)
165165
if binding not in supported_bindings:
166-
logger.debug('Binding %s not in IDP %s supported bindings: %s' % (
167-
binding, selected_idp, supported_bindings))
166+
logger.debug('Binding %s not in IDP %s supported bindings: %s',
167+
binding, selected_idp, supported_bindings)
168168
if binding == BINDING_HTTP_POST:
169-
logger.warning('IDP %s does not support %s, trying %s' % (
170-
selected_idp, binding, BINDING_HTTP_REDIRECT))
169+
logger.warning('IDP %s does not support %s, trying %s',
170+
selected_idp, binding, BINDING_HTTP_REDIRECT)
171171
binding = BINDING_HTTP_REDIRECT
172172
if sign_requests:
173173
sign_requests = False
174-
logger.warning('sp_authn_requests_signed is True, but ignoring because pysaml2 does not support it for %s' % BINDING_HTTP_REDIRECT)
174+
logger.warning('sp_authn_requests_signed is True, but ignoring because pysaml2 does not support it for %s', BINDING_HTTP_REDIRECT)
175175
else:
176176
binding = BINDING_HTTP_POST
177177
# if switched binding still not supported, give up
178178
if binding not in supported_bindings:
179-
raise UnsupportedBinding('IDP does not support %s or %s' % (
180-
BINDING_HTTP_POST, BINDING_HTTP_REDIRECT))
179+
raise UnsupportedBinding('IDP does not support %s or %s',
180+
BINDING_HTTP_POST, BINDING_HTTP_REDIRECT)
181181

182182
client = Saml2Client(conf)
183183
try:

0 commit comments

Comments
 (0)