Allow the UUID to return a uuid object based on a provided UUID string
This commit is contained in:
parent
3931a5cfe8
commit
8c07f1ac41
|
@ -277,8 +277,10 @@ def enumerate_descendants(parent):
|
|||
len(terminals), parent))
|
||||
return(containers, terminals)
|
||||
|
||||
def make_uuid():
|
||||
def make_uuid(str_uuid=None):
|
||||
"""Generate a UUID for an object"""
|
||||
if str_uuid:
|
||||
return uuid.UUID(str_uuid)
|
||||
return uuid.uuid4()
|
||||
|
||||
def inject_uuid(target):
|
||||
|
|
Loading…
Reference in New Issue