Commit c20805e1 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Merge branch 'master' into 'production'

Release 1.0.2

See merge request !48
parents dae5776b c32dc127
...@@ -20,6 +20,7 @@ PROC_KEY = "%s.%s" ...@@ -20,6 +20,7 @@ PROC_KEY = "%s.%s"
class JSONEncoder(json.JSONEncoder): class JSONEncoder(json.JSONEncoder):
"""Add to the standard JSON encoder: """Add to the standard JSON encoder:
- Exception
- date - date
- datetime - datetime
- lazyT - lazyT
...@@ -65,7 +66,7 @@ class JSONEncoder(json.JSONEncoder): ...@@ -65,7 +66,7 @@ class JSONEncoder(json.JSONEncoder):
datetime.time)): datetime.time)):
return obj.isoformat().replace("T", " ") return obj.isoformat().replace("T", " ")
elif isinstance(obj, lazyT): elif isinstance(obj, (lazyT, Exception)):
return str(obj) return str(obj)
return json.JSONEncoder.default(self, obj) return json.JSONEncoder.default(self, obj)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment