Dont key error when theres no request

This commit is contained in:
Dan Tracy 2015-06-24 14:27:35 -04:00
parent 02b0b4694e
commit d1ce45baf3

View file

@ -86,7 +86,7 @@ class JSONRequestFormatter(logging.Formatter):
if not value:
del output[key]
if 'message' in output:
del output['request']
output.pop('request', None)
return json.dumps(output)