Changeset - 096ce7327aad
[Not reviewed]
default
0 1 0
Mads Kiilerich (mads) - 6 years ago 2019-11-23 15:55:40
mads@kiilerich.com
Grafted from: c458e9038171
lib: drop redundant json.dumps encoding=utf8

Not supported in py3 - json is by definition(?) always UTF-8.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/base.py
Show inline comments
 
@@ -625,13 +625,13 @@ def jsonify(func, *args, **kwargs):
 
        msg = "JSON responses with Array envelopes are susceptible to " \
 
              "cross-site data leak attacks, see " \
 
              "https://web.archive.org/web/20120519231904/http://wiki.pylonshq.com/display/pylonsfaq/Warnings"
 
        warnings.warn(msg, Warning, 2)
 
        log.warning(msg)
 
    log.debug("Returning JSON wrapped action output")
 
    return json.dumps(data, encoding='utf-8')
 
    return json.dumps(data)
 

	
 
@decorator.decorator
 
def IfSshEnabled(func, *args, **kwargs):
 
    """Decorator for functions that can only be called if SSH access is enabled.
 

	
 
    If SSH access is disabled in the configuration file, HTTPNotFound is raised.
0 comments (0 inline, 0 general)