added get_type_from_id function to utils
parent
ef3ce9f6f0
commit
8930e72cc3
|
@ -255,3 +255,6 @@ def get_class_hierarchy_names(obj):
|
||||||
for cls in obj.__class__.__mro__:
|
for cls in obj.__class__.__mro__:
|
||||||
names.append(cls.__name__)
|
names.append(cls.__name__)
|
||||||
return names
|
return names
|
||||||
|
|
||||||
|
def get_type_from_id(stix_id):
|
||||||
|
return stix_id.split('--', 1)[0]
|
||||||
|
|
Loading…
Reference in New Issue