Replace tostring with tobytes

This commit is contained in:
Anthony Wang 2023-02-21 22:24:51 -05:00
parent 19644d41f3
commit 072de7c41b
Signed by: a
GPG key ID: 42A5B952E6DD8D38

View file

@ -255,15 +255,15 @@ def write_to_db(filename):
if not entry:
header[29]=props['type']
# debug galt:
#galt = entry=header.tostring()
#galt = entry=header.tobytes()
#print("typeofGALT",type(galt))
# this is apparently returning type bytes ?
galt = "".join([c+"\0" for c in filename[:261]])+ \
"\0"*(525-2*len(filename))
entry=header.tostring()+galt.encode()
entry=header.tobytes()+galt.encode()
# ORIG
# entry=header.tostring()+ \
# entry=header.tobytes()+ \
# "".join([c+"\0" for c in filename[:261]])+ \
# "\0"*(525-2*len(filename))