mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-17 18:29:54 +00:00
Oh right, Python 2 Eliot doesn't support custom JSON encoders.
This commit is contained in:
parent
32607b5ada
commit
d60bc2841a
@ -73,6 +73,9 @@ RUN_TEST = ActionType(
|
|||||||
|
|
||||||
# On Python 3, we want to use our custom JSON encoder when validating messages
|
# On Python 3, we want to use our custom JSON encoder when validating messages
|
||||||
# can be encoded to JSON:
|
# can be encoded to JSON:
|
||||||
|
if PY2:
|
||||||
|
_memory_logger = MemoryLogger
|
||||||
|
else:
|
||||||
_memory_logger = lambda: MemoryLogger(encoder=AnyBytesJSONEncoder)
|
_memory_logger = lambda: MemoryLogger(encoder=AnyBytesJSONEncoder)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user