def read_local_conf(local_conf):
    """Search for conf.py in any rel_source directory in CWD and if found read it and return.

    :param str local_conf: Path to conf.py to read.

    :return: Loaded conf.py.
    :rtype: dict
    """
    log = logging.getLogger(__name__)

    # Attempt to read.
    log.info('Reading config from %s...', local_conf)
    try:
        config = read_config(os.path.dirname(local_conf), '<local>')
    except HandledError:
        log.warning('Unable to read file, continuing with only CLI args.')
        return dict()

    # Filter and return.
    return {k[4:]: v for k, v in config.items() if k.startswith('scv_') and not k[4:].startswith('_')}
def read_local_conf ( local_conf ) : log = logging . getLogger ( __name__ ) log . info ( 'Reading config from %s...' , local_conf ) try : config = read_config ( os . path . dirname ( local_conf ) , '<local>' ) except HandledError : log . warning ( 'Unable to read file, continuing with only CLI args.' ) return dict ( ) return { k [ 4 : ] : v for k , v in config . items ( ) if k . startswith ( 'scv_' ) and not k [ 4 : ] . startswith ( '_' ) }
Search for conf.py in any rel_source directory in CWD and if found read it and return.

    :param str local_conf: Path to conf.py to read.

    :return: Loaded conf.py.
    :rtype: dict