File reader fixes for verbs
- Fix local file reader to always read in chunks - Have gzip stream raise an exception if the full data is requested
This commit is contained in:
parent
0c7839203e
commit
c07dec4d39
2 changed files with 8 additions and 3 deletions
|
@ -11,6 +11,9 @@ class GzipWrap(object):
|
|||
self.is_done = False
|
||||
|
||||
def read(self, size=-1):
|
||||
if size is None or size < 0:
|
||||
raise Exception('Call to GzipWrap with unbound size will result in poor performance')
|
||||
|
||||
# If the buffer already has enough bytes, then simply pop them off of
|
||||
# the beginning and return them.
|
||||
if len(self.buffer) >= size or self.is_done:
|
||||
|
|
Reference in a new issue