From 3fdf70b61d3a45754a70d726ee4e59b8fd794883 Mon Sep 17 00:00:00 2001 From: Alejandro Aguilera Date: Thu, 24 Mar 2011 23:47:17 +0100 Subject: [PATCH] Fix problem with get_lvldata in chunk.py: filename = None doesn't mean chunk corrupt. --- chunk.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chunk.py b/chunk.py index 3644345..63de064 100644 --- a/chunk.py +++ b/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 level info""" + # non existent region file doesn't mean corrupt chunk. + if filename == None: + return None + try: d = world.load_from_region(filename, x, y) except Exception, e: