예제 #1
0
def _get_phylesystem_parent_with_source(**kwargs):
    src = 'environment'
    try:
        phylesystem_parent = expand_path(get_config_setting('phylesystem', 'parent'))
        src = 'configfile'
    except:
        raise ValueError('No [phylesystem] "parent" specified in config or environmental variables')
    x = phylesystem_parent.split(':')  # TEMP hardcoded assumption that : does not occur in a path name
    return x, src
예제 #2
0
파일: helper.py 프로젝트: rvosa/peyotl
def _get_phylesystem_parent_with_source(**kwargs):
    src = "environment"
    if "PHYLESYSTEM_PARENT" in os.environ:
        phylesystem_parent = os.environ.get("PHYLESYSTEM_PARENT")
    else:
        try:
            phylesystem_parent = expand_path(get_config_setting_kwargs(None, "phylesystem", "parent", **kwargs))
            src = "configfile"
        except:
            raise ValueError('No [phylesystem] "parent" specified in config or environmental variables')
    x = phylesystem_parent.split(":")  # TEMP hardcoded assumption that : does not occur in a path name
    return x, src
예제 #3
0
def _get_phylesystem_parent_with_source(**kwargs):
    src = 'environment'
    if 'PHYLESYSTEM_PARENT' in os.environ:
        phylesystem_parent = os.environ.get('PHYLESYSTEM_PARENT')
    else:
        try:
            phylesystem_parent = expand_path(
                get_config_setting_kwargs(None, 'phylesystem', 'parent',
                                          **kwargs))
            src = 'configfile'
        except:
            raise ValueError(
                'No [phylesystem] "parent" specified in config or environmental variables'
            )
    x = phylesystem_parent.split(
        ':')  #TEMP hardcoded assumption that : does not occur in a path name
    return x, src