diff options
author | Gustavo Picon <tabo@tabo.pe> | 2014-01-12 20:04:16 -0500 |
---|---|---|
committer | Gustavo Picon <tabo@tabo.pe> | 2014-01-12 20:04:16 -0500 |
commit | 89b473735d830a1eda091da5f726ea74a110f7ea (patch) | |
tree | 07c1716a9c20b3366ce70d1b8932a44eb69e8ea1 /cherrypy/lib/encoding.py | |
parent | ebbf43f5ff35c39d5f936b47a5a68d54eaaf27cf (diff) | |
download | cherrypy-git-89b473735d830a1eda091da5f726ea74a110f7ea.tar.gz |
More PEP8 work.
Diffstat (limited to 'cherrypy/lib/encoding.py')
-rw-r--r-- | cherrypy/lib/encoding.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cherrypy/lib/encoding.py b/cherrypy/lib/encoding.py index d0b66b49..59ae3b15 100644 --- a/cherrypy/lib/encoding.py +++ b/cherrypy/lib/encoding.py @@ -14,13 +14,13 @@ def decode(encoding=None, default_encoding='utf-8'): encoding If not None, restricts the set of charsets attempted while decoding - a request entity to the given set (even if a different charset is given in - the Content-Type request header). + a request entity to the given set (even if a different charset is + given in the Content-Type request header). default_encoding Only in effect if the 'encoding' argument is not given. - If given, the set of charsets attempted while decoding a request entity is - *extended* with the given value(s). + If given, the set of charsets attempted while decoding a request + entity is *extended* with the given value(s). """ body = cherrypy.request.body @@ -219,8 +219,8 @@ class ResponseEncoder: do_find = True else: if self.debug: - cherrypy.log('Not finding because Content-Type %s does ' - 'not start with "text/"' % ct, + cherrypy.log('Not finding because Content-Type %s ' + 'does not start with "text/"' % ct, 'TOOLS.ENCODE') do_find = False else: @@ -284,7 +284,8 @@ def decompress(body): return data -def gzip(compress_level=5, mime_types=['text/html', 'text/plain'], debug=False): +def gzip(compress_level=5, mime_types=['text/html', 'text/plain'], + debug=False): """Try to gzip the response body if Content-Type in mime_types. cherrypy.response.headers['Content-Type'] must be set to one of the |