Disable false errors reported by Pylint.
This commit is contained in:
parent
57eef3c5ab
commit
58b608c4d0
@ -54,7 +54,10 @@ def _check(request, function):
|
|||||||
authorization = request.headers.get("Authorization", None)
|
authorization = request.headers.get("Authorization", None)
|
||||||
if authorization:
|
if authorization:
|
||||||
challenge = authorization.lstrip("Basic").strip().encode("ascii")
|
challenge = authorization.lstrip("Basic").strip().encode("ascii")
|
||||||
|
# ``_check`` decorator can access ``request`` protected functions
|
||||||
|
# pylint: disable-msg=W0212
|
||||||
plain = request._decode(base64.b64decode(challenge))
|
plain = request._decode(base64.b64decode(challenge))
|
||||||
|
# pylint: enable-msg=W0212
|
||||||
user, password = plain.split(":")
|
user, password = plain.split(":")
|
||||||
else:
|
else:
|
||||||
user = password = None
|
user = password = None
|
||||||
@ -71,10 +74,13 @@ def _check(request, function):
|
|||||||
|
|
||||||
class HTTPServer(server.HTTPServer):
|
class HTTPServer(server.HTTPServer):
|
||||||
"""HTTP server."""
|
"""HTTP server."""
|
||||||
|
# Maybe a Pylint bug, ``__init__`` calls ``server.HTTPServer.__init__``
|
||||||
|
# pylint: disable-msg=W0231
|
||||||
def __init__(self, address, handler):
|
def __init__(self, address, handler):
|
||||||
"""Create server."""
|
"""Create server."""
|
||||||
server.HTTPServer.__init__(self, address, handler)
|
server.HTTPServer.__init__(self, address, handler)
|
||||||
self.acl = acl.load()
|
self.acl = acl.load()
|
||||||
|
# pylint: enable-msg=W0231
|
||||||
|
|
||||||
|
|
||||||
class HTTPSServer(HTTPServer):
|
class HTTPSServer(HTTPServer):
|
||||||
|
Loading…
Reference in New Issue
Block a user