Exemple #1
0
def loadModule(name):
    if name not in _modules:
        return False
    module = _modules[name]
    if module.loaded:
        return True
    log.notice('Loading module %s' % name)
    events.setLoadingModule(module)
    module.loadFunction()
    events.setLoadingModule(None)
    module.loaded = True
    return True
Exemple #2
0
def loadModule(name):
    if name.lower() not in _modules:
        return False
    module = _modules[name.lower()]
    if module.loaded:
        return True
    log.notice("Loading module %s" % name)
    events.setLoadingModule(module)
    module.loadFunction()
    for service in module.services:
        service.start()
    events.setLoadingModule(None)
    module.loaded = True
    return True