don't try to pass None into decompressSectors

This commit is contained in:
David Vierra 2011-02-27 01:10:44 -10:00
parent ede1a2ba4b
commit 2a7ae26db3

View File

@ -2273,7 +2273,9 @@ class MCRegionFile(object):
return data return data
def readChunk(self, cx, cz): def readChunk(self, cx, cz):
return self.decompressSectors(self._readChunk(cx,cz)) data = self._readChunk(cx,cz)
if data is None: return data
return self.decompressSectors(data)
def decompressSectors(self, data): def decompressSectors(self, data):
length = struct.unpack_from(">I", data)[0] length = struct.unpack_from(">I", data)[0]