mirror of
https://github.com/openkmip/pykmip
synced 2025-12-13 14:53:15 +00:00
Block Attributes encoding and decoding on non KMIP 2.0 calls
This change adds a check to the read and write methods of the new Attributes object that raises a new VersionNotSupported exception if KMIP 2.0 is not the version used for encoding and decoding. The Attributes object is not defined for older versions of KMIP and therefore cannot be correctly encoded or decoded in those use cases.
This commit is contained in:
committed by
Peter Hamilton
parent
24f30d46b2
commit
54f3688a14
@@ -324,6 +324,12 @@ class ShutdownError(Exception):
|
||||
"""
|
||||
|
||||
|
||||
class VersionNotSupported(Exception):
|
||||
"""
|
||||
An error generated when an unsupported KMIP version is referenced.
|
||||
"""
|
||||
|
||||
|
||||
class StreamNotEmptyError(Exception):
|
||||
def __init__(self, cls, extra):
|
||||
super(StreamNotEmptyError, self).__init__()
|
||||
|
||||
Reference in New Issue
Block a user