From 96c155909e317d13a13d4b7e1f08efa651a9b60c Mon Sep 17 00:00:00 2001 From: David O'Shea Date: Sat, 29 Sep 2012 23:24:56 +0930 Subject: [PATCH] Correct references to ChunkMalformed exception in dumpSigns/dumpChests The exception handlers in the dumpSigns and dumpChests commands referenced ChunkMalformed in the wrong package. This fix corrects the references, but note that this by itself is not desirable, as ChunkMalformed is raised when a MemoryError occurs, and the exception handlers ignore the exception. As a MemoryError is not likely to go away by itself, this can result in a flood of error messages being printed, instead of the existing behaviour where execution of the command terminates due to the incorrect reference to ChunkMalformed. --- mce.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mce.py b/mce.py index e7bafb6..0ab70e7 100644 --- a/mce.py +++ b/mce.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +import mclevelbase import mclevel import infiniteworld import sys @@ -620,7 +621,7 @@ class mce(object): for i, cPos in enumerate(self.level.allChunks): try: chunk = self.level.getChunk(*cPos) - except mclevel.ChunkMalformed: + except mclevelbase.ChunkMalformed: continue for tileEntity in chunk.TileEntities: @@ -779,7 +780,7 @@ class mce(object): for i, cPos in enumerate(self.level.allChunks): try: chunk = self.level.getChunk(*cPos) - except mclevel.ChunkMalformed: + except mclevelbase.ChunkMalformed: continue for tileEntity in chunk.TileEntities: