From caa1ef1f45940e02496a3344e8272b8c58755f82 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Mon, 28 Feb 2011 18:56:22 -0500 Subject: [PATCH] Catch proper exception in chunk.py Also removed unnecessary check in world.py --- chunk.py | 4 ++-- world.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/chunk.py b/chunk.py index 1749ad6..a5d2969 100644 --- a/chunk.py +++ b/chunk.py @@ -366,7 +366,7 @@ class ChunkRenderer(object): self._up_right_skylight = get_skylight_array(chunk_data) self._up_right_blocklight = get_blocklight_array(chunk_data) self._up_right_blocks = get_blockarray(chunk_data) - except IOError: + except NoSuchChunk: self._up_right_skylight = None self._up_right_blocklight = None self._up_right_blocks = None @@ -386,7 +386,7 @@ class ChunkRenderer(object): self._up_left_skylight = get_skylight_array(chunk_data) self._up_left_blocklight = get_blocklight_array(chunk_data) self._up_left_blocks = get_blockarray(chunk_data) - except IOError: + except NoSuchChunk: self._up_left_skylight = None self._up_left_blocklight = None self._up_left_blocks = None diff --git a/world.py b/world.py index 8976d15..68a1cec 100644 --- a/world.py +++ b/world.py @@ -379,8 +379,7 @@ class WorldRenderer(object): result = pool.apply_async(chunk.render_and_save, args=(chunkXY,self.cachedir,self, oldimg), kwds=dict(cave=self.caves, queue=q)) - if result: - asyncresults.append((col, row, result)) + asyncresults.append((col, row, result)) pool.close()