handle tuples in network RPC request data

This commit is contained in:
Lex Berezhny 2018-06-03 20:07:40 -04:00
parent 740af0465e
commit 09a32174c8

View file

@ -25,7 +25,7 @@ def unicode2bytes(string):
def bytes2unicode(maybe_bytes):
if isinstance(maybe_bytes, bytes):
return maybe_bytes.decode()
elif isinstance(maybe_bytes, list):
elif isinstance(maybe_bytes, (list, tuple)):
return [bytes2unicode(b) for b in maybe_bytes]
return maybe_bytes