(target)
Inject a UUID into an existing object
Inject a UUID into an existing object
Inject a UUID into an existing object
def inject_uuid(target):
    """Inject a UUID into an existing object"""
    uuid = make_uuid()
    if not hasattr(target, "uuid") or target.uuid == None:
        dbg("Injecting UUID %s into: %s" % (uuid, target))
        target.uuid = uuid
    else:
        dbg("Object already has a UUID: %s" % target)
def inject_uuid ( target ) : uuid = make_uuid ( ) if not hasattr ( target , "uuid" ) or target . uuid == None : dbg ( "Injecting UUID %s into: %s" % ( uuid , target ) ) target . uuid = uuid else : dbg ( "Object already has a UUID: %s" % target )