Author: Justin Peel <[email protected]>
Branch:
Changeset: r46915:41ad1c84aec7
Date: 2011-08-30 01:26 -0600
http://bitbucket.org/pypy/pypy/changeset/41ad1c84aec7/
Log: fix a gzip test and still get most of the speed up.
diff --git a/lib-python/modified-2.7/gzip.py b/lib-python/modified-2.7/gzip.py
--- a/lib-python/modified-2.7/gzip.py
+++ b/lib-python/modified-2.7/gzip.py
@@ -246,6 +246,8 @@
readsize = min(self.max_read_chunk, readsize * 2)
except EOFError:
size = self.extrasize
+ elif size == 0:
+ return ""
else: # just get some more of it
try:
while size > self.extrasize:
@@ -418,6 +420,7 @@
self.write((count % 1024) * '\0')
elif self.mode == READ:
if offset == self.offset:
+ self.read(0) # to make sure that this file is open
return self.offset
if offset < self.offset:
# for negative seek, rewind and do positive seek
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit