Use io.BytesIO instead of StringIO.StringIO in all
spots where bytes are read and written (StringIO.StringIO
doesn't work, because it promotes bytes to str).
1 file changed