added get_type_from_id function to utils

stix2.0
Sam Cornwell 2017-11-19 22:11:44 -05:00
parent ef3ce9f6f0
commit 8930e72cc3
1 changed files with 3 additions and 0 deletions

View File

@ -255,3 +255,6 @@ def get_class_hierarchy_names(obj):
for cls in obj.__class__.__mro__:
names.append(cls.__name__)
return names
def get_type_from_id(stix_id):
return stix_id.split('--', 1)[0]