Merge pull request #6 from sprockets/fix-key-error-with-periodic-callbacks

Dont raise a KeyError when theres no request
This commit is contained in:
Gavin M. Roy 2015-06-24 14:31:42 -04:00
commit e2e6c40c81

View file

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