From 536a6d64dc2a80347d5917ce955ff8cd9eab59be Mon Sep 17 00:00:00 2001 From: Michael Marchetti Date: Thu, 3 Dec 2015 12:49:12 -0500 Subject: [PATCH] Use `dict()` to convert the mapping to a dictionary --- notebook/log.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/notebook/log.py b/notebook/log.py index 9e727f0b7..dab330cb4 100644 --- a/notebook/log.py +++ b/notebook/log.py @@ -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))