From 9fcdacb62405cc2e1ae63a73a3be74d3fa926083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Fri, 23 Jun 2017 16:29:04 +0200 Subject: [PATCH] Modified the name of an argument. --- sanic/exceptions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sanic/exceptions.py b/sanic/exceptions.py index 1cf28a8e..95e41b4a 100644 --- a/sanic/exceptions.py +++ b/sanic/exceptions.py @@ -205,19 +205,19 @@ class Unauthorized(SanicException): :param scheme: Name of the authentication scheme to be used. :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 Digest scheme. (optional) """ pass - def __init__(self, message, scheme, realm="", others=None): + def __init__(self, message, scheme, realm="", challenge=None): super().__init__(message) adds = "" - if others is not None: - values = ["{!s}={!r}".format(k, v) for k, v in others.items()] + if challenge is not None: + values = ["{!s}={!r}".format(k, v) for k, v in challenge.items()] adds = ', '.join(values) adds = ', {}'.format(adds)