Skip to content

Commit

Permalink
allow for copying text files
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Nov 22, 2016
1 parent 667edbd commit e8555a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def copy_file_data(src_file, dst_file, chunk_size=None):
chunk_size = chunk_size or constants.DEFAULT_CHUNK_SIZE
read = src_file.read
write = dst_file.write
for chunk in iter(lambda: read(chunk_size), b''):
for chunk in iter(lambda: read(chunk_size) or None, None):
write(chunk)


Expand Down

0 comments on commit e8555a7

Please sign in to comment.