diff options
-rw-r--r-- | docs/source/s3_tut.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/source/s3_tut.rst b/docs/source/s3_tut.rst index 83093bfa..23e0350d 100644 --- a/docs/source/s3_tut.rst +++ b/docs/source/s3_tut.rst @@ -190,12 +190,12 @@ to be taken. The example below makes use of the FileChunkIO module, so # Use a chunk size of 50 MiB (feel free to change this) >>> chunk_size = 52428800 - >>> chunk_count = int(math.ceil(source_size / chunk_size)) + >>> chunk_count = int(math.ceil(source_size / float(chunk_size))) # Send the file parts, using FileChunkIO to create a file-like object # that points to a certain byte range within the original file. We # set bytes to never exceed the original file size. - >>> for i in range(chunk_count + 1): + >>> for i in range(chunk_count): >>> offset = chunk_size * i >>> bytes = min(chunk_size, source_size - offset) >>> with FileChunkIO(source_path, 'r', offset=offset, |