0

Fix problem with get_lvldata in chunk.py: filename = None doesn't mean chunk corrupt.

This commit is contained in:
Alejandro Aguilera
2011-03-24 23:47:17 +01:00
parent d04bea2b66
commit 3fdf70b61d

View File

@@ -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: