mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 23:26:43 +00:00
On Python 2 we don't need to convert byte keys to unicode.
This commit is contained in:
parent
203652d087
commit
af49dcb89e
@ -18,7 +18,14 @@ from pyutil import nummedobj
|
|||||||
from foolscap.logging import log
|
from foolscap.logging import log
|
||||||
from twisted.python import log as tw_log
|
from twisted.python import log as tw_log
|
||||||
|
|
||||||
from .jsonbytes import bytes_to_unicode
|
if PY2:
|
||||||
|
def bytes_to_unicode(ign, obj):
|
||||||
|
return obj
|
||||||
|
else:
|
||||||
|
# We want to convert bytes keys to Unicode, otherwise JSON serialization
|
||||||
|
# inside foolscap will fail (for details see
|
||||||
|
# https://github.com/warner/foolscap/issues/88)
|
||||||
|
from .jsonbytes import bytes_to_unicode
|
||||||
|
|
||||||
|
|
||||||
NOISY = log.NOISY # 10
|
NOISY = log.NOISY # 10
|
||||||
|
Loading…
Reference in New Issue
Block a user