Show More
@@ -899,7 +899,7 b' class chunkbuffer(object):' | |||
|
899 | 899 | """Read L bytes of data from the iterator of chunks of data. |
|
900 | 900 | Returns less than L bytes if the iterator runs dry.""" |
|
901 | 901 | left = l |
|
902 |
buf = |
|
|
902 | buf = [] | |
|
903 | 903 | queue = self._queue |
|
904 | 904 | while left > 0: |
|
905 | 905 | # refill the queue |
@@ -917,11 +917,11 b' class chunkbuffer(object):' | |||
|
917 | 917 | left -= len(chunk) |
|
918 | 918 | if left < 0: |
|
919 | 919 | queue.appendleft(chunk[left:]) |
|
920 |
buf |
|
|
920 | buf.append(chunk[:left]) | |
|
921 | 921 | else: |
|
922 |
buf |
|
|
922 | buf.append(chunk) | |
|
923 | 923 | |
|
924 | return buf | |
|
924 | return ''.join(buf) | |
|
925 | 925 | |
|
926 | 926 | def filechunkiter(f, size=65536, limit=None): |
|
927 | 927 | """Create a generator that produces the data in the file size |
General Comments 0
You need to be logged in to leave comments.
Login now