Modified the name of an argument.

This commit is contained in:
François KUBLER 2017-06-23 16:29:04 +02:00
parent cf1713b085
commit 9fcdacb624

View File

@ -205,19 +205,19 @@ class Unauthorized(SanicException):
:param scheme: Name of the authentication scheme to be used. :param scheme: Name of the authentication scheme to be used.
:param realm: Description of the protected area. (optional) :param realm: Description of the protected area. (optional)
:param others: A dict containing values to add to the WWW-Authenticate :param challenge: A dict containing values to add to the WWW-Authenticate
header that is generated. This is especially useful when dealing with the header that is generated. This is especially useful when dealing with the
Digest scheme. (optional) Digest scheme. (optional)
""" """
pass pass
def __init__(self, message, scheme, realm="", others=None): def __init__(self, message, scheme, realm="", challenge=None):
super().__init__(message) super().__init__(message)
adds = "" adds = ""
if others is not None: if challenge is not None:
values = ["{!s}={!r}".format(k, v) for k, v in others.items()] values = ["{!s}={!r}".format(k, v) for k, v in challenge.items()]
adds = ', '.join(values) adds = ', '.join(values)
adds = ', {}'.format(adds) adds = ', {}'.format(adds)