clarify the temp variable for decompression here

This commit is contained in:
David Vierra 2010-09-18 01:55:11 -10:00
parent e254ceaae6
commit d08429643d

View File

@ -622,14 +622,16 @@ class MCLevel:
#ungzdata = None
compressed = True
unzippedData = None;
try:
data = gzip.GzipFile(fileobj=StringIO.StringIO(rawdata)).read();
unzippedData = gzip.GzipFile(fileobj=StringIO.StringIO(rawdata)).read();
except Exception,e:
print "Exception during Gzip operation, assuming {0} uncompressed: ".format(filename), e
compressed = False;
if unzippedData is None:
compressed = False;
#if(ungzdata): data=ungzdata
data = fromstring(data, dtype='uint8')
data = fromstring(unzippedData, dtype='uint8')
if isJavaLevel(data):
print "Detected compressed Java-style level"