diff --git a/kmip/core/objects.py b/kmip/core/objects.py index 195ccb3..5b518ec 100644 --- a/kmip/core/objects.py +++ b/kmip/core/objects.py @@ -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)