diff --git a/util/gzipwrap.py b/util/gzipwrap.py index c44615b73..e34fa5745 100644 --- a/util/gzipwrap.py +++ b/util/gzipwrap.py @@ -11,12 +11,9 @@ class GzipWrap(object): self.is_done = False def read(self, size=-1): - if self.is_done: - return '' - # If the buffer already has enough bytes, then simply pop them off of # the beginning and return them. - if len(self.buffer) >= size: + if len(self.buffer) >= size or self.is_done: ret = self.buffer[0:size] self.buffer = self.buffer[size:] return ret