Added handling for EOF reading error in gzipped content.
This commit is contained in:
parent
826a1fdaa2
commit
0afd3fc42f
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue