mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-25 07:31:07 +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,6 +18,13 @@ 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
|
||||||
|
|
||||||
|
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
|
from .jsonbytes import bytes_to_unicode
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user