Fix problem with get_lvldata in chunk.py: filename = None doesn't mean chunk corrupt.
This commit is contained in:
4
chunk.py
4
chunk.py
@@ -50,6 +50,10 @@ def get_lvldata(world, filename, x, y, retries=2):
|
|||||||
"""Takes a filename and chunkcoords and returns the Level struct, which contains all the
|
"""Takes a filename and chunkcoords and returns the Level struct, which contains all the
|
||||||
level info"""
|
level info"""
|
||||||
|
|
||||||
|
# non existent region file doesn't mean corrupt chunk.
|
||||||
|
if filename == None:
|
||||||
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
d = world.load_from_region(filename, x, y)
|
d = world.load_from_region(filename, x, y)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|||||||
Reference in New Issue
Block a user