Use dict() to convert the mapping to a dictionary

This commit is contained in:
Michael Marchetti 2015-12-03 12:49:12 -05:00
parent 5639ac7134
commit 536a6d64dc

View File

@ -43,7 +43,6 @@ def log_request(handler):
msg = msg + ' referer={referer}'
if status >= 500 and status != 502:
# log all headers if it caused an error
headers = { k: request.headers[k] for k in request.headers }
log_method(json.dumps(headers, indent=2))
log_method(json.dumps(dict(request.headers), indent=2))
log_method(msg.format(**ns))