fixed scrapy.utils.gz.gunzip() broken after changes from Python 2.7.3 to 2.7.4

This commit is contained in:
Pablo Hoffman 2013-08-09 18:20:04 -03:00
parent 29a12af1b0
commit 4dc76e7cca
2 changed files with 6 additions and 1 deletions

5
requirements.txt Normal file
View File

@ -0,0 +1,5 @@
Twisted>=8.0
w3lib>=1.2
queuelib
lxml
pyOpenSSL

View File

@ -14,7 +14,7 @@ def gunzip(data):
try:
chunk = f.read(8196)
output += chunk
except (IOError, struct.error):
except (IOError, EOFError, struct.error):
# complete only if there is some data, otherwise re-raise
# see issue 87 about catching struct.error
# some pages are quite small so output is '' and f.extrabuf