Added handling for EOF reading error in gzipped content.

This commit is contained in:
Oleksandr Sheremet 2013-06-17 21:46:54 +03:00
parent 826a1fdaa2
commit 0afd3fc42f

View File

@ -54,7 +54,7 @@ def decode_gzip(content):
gfile = gzip.GzipFile(fileobj=cStringIO.StringIO(content))
try:
return gfile.read()
except IOError:
except (IOError, EOFError):
return None
def encode_gzip(content):