Commit a4958685 authored by ulrich_y's avatar ulrich_y
Browse files

Follow-up to 6d1633b5

parent d788fcce
......@@ -54,8 +54,11 @@ def read_record(fp, typ):
body = struct.unpack("<"+typ*n, body)
if typ == 'c':
body = b''.join(body).decode()
if type(body) == unicode:
body = body.encode()
try:
if type(body) == unicode:
body = body.encode()
except:
pass
return body
else:
if n == 1:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment