yolta
This commit is contained in:
parent
c02fc1fd36
commit
720269fb03
2 changed files with 13 additions and 5 deletions
|
|
@ -15,7 +15,13 @@ def convert_to_strings(obj):
|
|||
elif isinstance(obj, list) or isinstance(obj, tuple):
|
||||
return [convert_to_strings(element) for element in obj]
|
||||
elif isinstance(obj, bytes):
|
||||
return str(obj)[2:-1]
|
||||
data = ""
|
||||
try:
|
||||
data = obj.decode('unicode-escape').encode('latin1').decode('utf-8')
|
||||
except:
|
||||
data = str(obj)[2:-1]
|
||||
return data
|
||||
|
||||
return obj
|
||||
|
||||
class NetworkThread(threading.Thread):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue