Show More
@@ -916,14 +916,13 b' class chunkbuffer(object):' | |||
|
916 | 916 | targetsize is how big a buffer to try to maintain.""" |
|
917 | 917 | self.iter = iter(in_iter) |
|
918 | 918 | self.buf = '' |
|
919 | self.targetsize = 2**16 | |
|
920 | 919 | |
|
921 | 920 | def read(self, l): |
|
922 | 921 | """Read L bytes of data from the iterator of chunks of data. |
|
923 | 922 | Returns less than L bytes if the iterator runs dry.""" |
|
924 | 923 | if l > len(self.buf) and self.iter: |
|
925 |
# Clamp to a multiple of |
|
|
926 |
targetsize = max(l, |
|
|
924 | # Clamp to a multiple of 2**16 | |
|
925 | targetsize = max(l, 2**16) | |
|
927 | 926 | collector = [str(self.buf)] |
|
928 | 927 | collected = len(self.buf) |
|
929 | 928 | for chunk in self.iter: |
General Comments 0
You need to be logged in to leave comments.
Login now