Merge pull request #137 from caujka/master
Handling for EOF reading error in gzipped content
This commit is contained in:
commit
c4d03d8b85
|
@ -54,7 +54,7 @@ def decode_gzip(content):
|
||||||
gfile = gzip.GzipFile(fileobj=cStringIO.StringIO(content))
|
gfile = gzip.GzipFile(fileobj=cStringIO.StringIO(content))
|
||||||
try:
|
try:
|
||||||
return gfile.read()
|
return gfile.read()
|
||||||
except IOError:
|
except (IOError, EOFError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def encode_gzip(content):
|
def encode_gzip(content):
|
||||||
|
|
Loading…
Reference in New Issue