mirror of
https://github.com/OpenKMIP/PyKMIP.git
synced 2025-07-19 20:14:27 +02:00
Merge pull request #436 from OpenKMIP/feat/improve-attribute-error-msg
Add a better error message when reading unparseable attributes
This commit is contained in:
commit
b0bd77e0d9
@ -112,6 +112,8 @@ class Attribute(Struct):
|
||||
enum_type = name
|
||||
|
||||
value = self.value_factory.create_attribute_value(enum_type, None)
|
||||
if value is None:
|
||||
raise Exception("No value type for {}".format(enum_name))
|
||||
self.attribute_value = value
|
||||
self.attribute_value.tag = Tags.ATTRIBUTE_VALUE
|
||||
self.attribute_value.read(tstream)
|
||||
|
Loading…
x
Reference in New Issue
Block a user