コード例 #1
0
ファイル: gcylc_spec.py プロジェクト: areinecke/cylc
def get_cfg( verbose=False ):
    global cfg
    if not cfg:
        cfg = load_combined( SITE_FILE, "site config",
                             USER_FILE, "user config",
                             SPEC, None, True, verbose )
    return cfg
コード例 #2
0
ファイル: site_spec.py プロジェクト: areinecke/cylc
def get_cfg( verbose=False ):
    global cfg
    if not cfg:
        cfg = load_combined( SITE_FILE, "site config",
                             USER_FILE, "user config",
                             SPEC, upg, True, verbose )

    # host item values of None default to modified localhost values
    for host in cfg['hosts']:
        if host == 'localhost':
            continue
        for item, value in cfg['hosts'][host].items():
            newvalue = value or cfg['hosts']['localhost'][item]
            if newvalue and 'directory' in item:
                # replace local home dir with $HOME for evaluation on other host
                newvalue = newvalue.replace( os.environ['HOME'], '$HOME' )
            cfg['hosts'][host][item] = newvalue

    return cfg
コード例 #3
0
ファイル: gcylc_spec.py プロジェクト: areinecke/cylc
def get_cfg(verbose=False):
    global cfg
    if not cfg:
        cfg = load_combined(SITE_FILE, "site config", USER_FILE, "user config",
                            SPEC, None, True, verbose)
    return cfg