pynbt: Catch and ignore both zlib.errors and IOErrors which may be thrown when trying to decompress data.

This commit is contained in:
David Vierra 2012-02-18 21:25:06 -10:00
parent 710d078bd5
commit 06c2168eed

View File

@ -496,7 +496,7 @@ def loadFile(filename):
data = inputdata
try:
data = gunzip(inputdata)
except IOError:
except (zlib.error, IOError):
print "File %s not zipped" % filename
return load(buf=fromstring(data, 'uint8'))