clarify the temp variable for decompression here
This commit is contained in:
parent
e254ceaae6
commit
d08429643d
@ -622,14 +622,16 @@ class MCLevel:
|
|||||||
|
|
||||||
#ungzdata = None
|
#ungzdata = None
|
||||||
compressed = True
|
compressed = True
|
||||||
|
unzippedData = None;
|
||||||
try:
|
try:
|
||||||
data = gzip.GzipFile(fileobj=StringIO.StringIO(rawdata)).read();
|
unzippedData = gzip.GzipFile(fileobj=StringIO.StringIO(rawdata)).read();
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
print "Exception during Gzip operation, assuming {0} uncompressed: ".format(filename), e
|
print "Exception during Gzip operation, assuming {0} uncompressed: ".format(filename), e
|
||||||
compressed = False;
|
if unzippedData is None:
|
||||||
|
compressed = False;
|
||||||
#if(ungzdata): data=ungzdata
|
#if(ungzdata): data=ungzdata
|
||||||
|
|
||||||
data = fromstring(data, dtype='uint8')
|
data = fromstring(unzippedData, dtype='uint8')
|
||||||
|
|
||||||
if isJavaLevel(data):
|
if isJavaLevel(data):
|
||||||
print "Detected compressed Java-style level"
|
print "Detected compressed Java-style level"
|
||||||
|
Reference in New Issue
Block a user