Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
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)
        


src/n/i/NINJA-PingU-HEAD/lib/terminator/terminatorlib/factory.py   NINJA-PingU(Download)
 
from borg import Borg
from util import dbg, err, inject_uuid
 
# pylint: disable-msg=R0201
        dbg('Factory::make: created a %s' % product)
        output = func(**kwargs)
        inject_uuid(output)
        return(output)