Commit ef9e1e3a authored by Vincent Pelletier's avatar Vincent Pelletier

Make pylint happier.

parent 11eba1c0
[MESSAGES CONTROL] [MESSAGES CONTROL]
disable=C0103,C0330 disable=C0103,C0330,R0903,R0913,R0914,R0912,R0915,R0902
# C0103 Disable "Invalid name "%s" (should match %s)" # C0103 "Invalid name "%s" (should match %s)"
# C0330 Disable "bad-continuation" # C0330 bad-continuation
# R0903 too-few-public-methods
# R0913 too-many-arguments
# R0914 too-many-locals
# R0912 too-many-branches
# R0915 too-many-statements
# R0902 too-many-instance-attributes
[FORMAT] [FORMAT]
indent-string=" " indent-string=" "
...@@ -45,6 +45,9 @@ class ChunkedFile(ProxyFile): ...@@ -45,6 +45,9 @@ class ChunkedFile(ProxyFile):
self._recv_buf = '' self._recv_buf = ''
def read(self, length=None): def read(self, length=None):
"""
Read chunked data.
"""
result = self._recv_buf result = self._recv_buf
if not self._at_eof: if not self._at_eof:
readline = self.readline readline = self.readline
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
# 8. By copying, installing or otherwise using Python, Licensee # 8. By copying, installing or otherwise using Python, Licensee
# agrees to be bound by the terms and conditions of this License # agrees to be bound by the terms and conditions of this License
# Agreement. # Agreement.
"""
Override WSGIRequestHandler.handle to change server handler class.
In its own file as python licence applies, unlike the rest of caucase.
"""
from __future__ import absolute_import from __future__ import absolute_import
from wsgiref.simple_server import WSGIRequestHandler as WSGIRequestHandler_org from wsgiref.simple_server import WSGIRequestHandler as WSGIRequestHandler_org
from .http_wsgibase import CleanServerHandler from .http_wsgibase import CleanServerHandler
......
...@@ -39,6 +39,9 @@ class ApplicationError(Exception): ...@@ -39,6 +39,9 @@ class ApplicationError(Exception):
@property @property
def response_headers(self): def response_headers(self):
"""
Get a copy of error's response headers.
"""
return self._response_headers[:] return self._response_headers[:]
class BadRequest(ApplicationError): class BadRequest(ApplicationError):
...@@ -58,7 +61,7 @@ class SSLUnauthorized(Unauthorized): ...@@ -58,7 +61,7 @@ class SSLUnauthorized(Unauthorized):
Authentication failed because of SSL credentials (missing or incorrect) Authentication failed because of SSL credentials (missing or incorrect)
""" """
_response_headers = [ _response_headers = [
# XXX: non standard scheme, suggested in # Note: non standard scheme, suggested in
# https://www.ietf.org/mail-archive/web/httpbisa/current/msg03764.html # https://www.ietf.org/mail-archive/web/httpbisa/current/msg03764.html
('WWW-Authenticate', 'transport'), ('WWW-Authenticate', 'transport'),
] ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment