

def init_system(etcdir, vardir):
    ' Initializes the system with system wide config files '
    if etcdir:
        log.info('Initializing config dir %s', etcdir)
        makedirsp(etcdir)
        with open(os.path.join(etcdir, 'config'), 'w') as cfile:
            cfile.write(config.format(os.path.join(etcdir, 'keys'), vardir))
    if cfile:
        log.info('Initializing state dir %s', vardir)
        makedirsp(vardir)
        create_json(os.path.join(vardir, 'info.json'))
    return True

dataset/ETHPy150Open gosquadron/squadron/squadron/setup.py init_system/VarMisuse@80/130 `vardir`->`cfile`