Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def validate_config(config):
    required = {
        'mattd.core': [],
        'logging': ['location', 'level', 'format'],
    }

    for section, items in required.items():
        if not section in config.sections():
            log.error("No [%s] section found in config." % section)
            return False

        for item in items:
            if not item in config.options(section):
                log.error("[%s] has no %r" % (section, item))
                return False

    return True
        


src/m/a/mattd.core-0.0.5/mattd/core/app.py   mattd.core(Download)
def main(daemonize=True):
 
    config = mattd.core.config.load_config()
    if not mattd.core.config.validate_config(config):
        return 1