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 """ 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 """ Region index entry points outside of the file or to an incomplete sector. Region compress type
is unknown. is unknown.
""" """
pass pass
class ChunkMalformed(LevelFormatError): class ChunkFormatError(LevelFormatError):
""" Chunk did not have an expected NBT tag. """ Chunk did not have an expected NBT tag.
""" """
pass pass

View File

@ -14,19 +14,13 @@ import time
import numpy import numpy
from mceditlib import nbt from mceditlib import nbt
from mceditlib.exceptions import ChunkNotPresent from mceditlib.exceptions import ChunkNotPresent, RegionFormatError
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
__author__ = 'Rio' __author__ = 'Rio'
class RegionFormatError(RuntimeError):
"""
Raised on an error in the region file format.
"""
def deflate(data): def deflate(data):
return zlib.compress(data, 2) return zlib.compress(data, 2)