Remove duplicate exceptions

This commit is contained in:
David Vierra 2015-03-21 16:17:14 -10:00
parent 048bc03d96
commit effde4d394
2 changed files with 3 additions and 9 deletions

View File

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

View File

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