mirror of
https://github.com/openkmip/pykmip
synced 2025-12-15 15:53:36 +00:00
Remove unused error code
This change removes unused exceptions defined in core/errors.py, along with the errors.py module itself. The few used items from this file are migrated over to core/exceptions.py. Any dependent code is updated, dropping the use of errors.py and adding in the use of exceptions.py.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
from binascii import hexlify
|
||||
import io
|
||||
|
||||
from kmip.core.errors import ErrorStrings
|
||||
from kmip.core import exceptions
|
||||
|
||||
|
||||
def bit_length(num):
|
||||
@@ -52,9 +52,8 @@ def is_stream_empty(stream):
|
||||
|
||||
def build_er_error(class_object, descriptor, expected, received,
|
||||
attribute=None):
|
||||
msg = ErrorStrings.BAD_EXP_RECV
|
||||
msg = exceptions.ErrorStrings.BAD_EXP_RECV
|
||||
|
||||
class_string = ''
|
||||
if attribute is None:
|
||||
class_string = '{0}'.format(class_object.__name__)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user