From effde4d394571d7b63e6eb7a6dfbae0e0d858ee0 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Sat, 21 Mar 2015 16:17:14 -1000 Subject: [PATCH] Remove duplicate exceptions --- src/mceditlib/exceptions.py | 4 ++-- src/mceditlib/pc/regionfile.py | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/mceditlib/exceptions.py b/src/mceditlib/exceptions.py index 89ccf7b..2349c3f 100644 --- a/src/mceditlib/exceptions.py +++ b/src/mceditlib/exceptions.py @@ -19,13 +19,13 @@ class LevelFormatError(Exception): """ General error for level data not being formatted as expected """ -class RegionMalformed(LevelFormatError): +class RegionFormatError(LevelFormatError): """ Region index entry points outside of the file or to an incomplete sector. Region compress type is unknown. """ pass -class ChunkMalformed(LevelFormatError): +class ChunkFormatError(LevelFormatError): """ Chunk did not have an expected NBT tag. """ pass diff --git a/src/mceditlib/pc/regionfile.py b/src/mceditlib/pc/regionfile.py index 504110f..a28c2b3 100644 --- a/src/mceditlib/pc/regionfile.py +++ b/src/mceditlib/pc/regionfile.py @@ -14,19 +14,13 @@ import time import numpy from mceditlib import nbt -from mceditlib.exceptions import ChunkNotPresent +from mceditlib.exceptions import ChunkNotPresent, RegionFormatError log = logging.getLogger(__name__) __author__ = 'Rio' -class RegionFormatError(RuntimeError): - """ - Raised on an error in the region file format. - """ - - def deflate(data): return zlib.compress(data, 2)