Skip to content

Commit

Permalink
Change writelines to write in rsync, to fix a problem with slow sync …
Browse files Browse the repository at this point in the history
…state building
  • Loading branch information
mfschwartz committed Nov 2, 2015
1 parent 2f0b6d1 commit a6dcc7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gslib/commands/rsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def _BatchSort(in_iter, out_file):
output_chunk = io.open('%s-%06i' % (out_file.name, len(chunk_files)),
mode='w+', encoding=UTF8)
chunk_files.append(output_chunk)
output_chunk.writelines(unicode(''.join(current_chunk)))
output_chunk.write(unicode(''.join(current_chunk)))
output_chunk.flush()
output_chunk.seek(0)
out_file.writelines(heapq.merge(*chunk_files))
Expand Down

0 comments on commit a6dcc7a

Please sign in to comment.