complay.py: Python 3 compat. (nw)

This commit is contained in:
Mike Naberezny 2016-03-30 21:06:12 -07:00
parent 1892ba703e
commit b4408c2906

View File

@ -38,11 +38,9 @@ try:
while True:
chunk = src.read(byteCount)
if chunk:
compchunk = zlib.compress(chunk, 9)
compchunk = bytearray(zlib.compress(chunk, 9))
compsize = len(compchunk)
for b in compchunk:
# For Python 2.x compatibility.
b = ord(b)
dst.write('%d' % b)
offs += 1
if offs != compsize: