Reads the config file using configparser

def _read_config(conf_file=None):
    '''
    Reads the config file using configparser
    '''
    if conf_file is None:
        paths = ('/etc/supervisor/supervisord.conf', '/etc/supervisord.conf')
        for path in paths:
            if os.path.exists(path):
                conf_file = path
                break
    if conf_file is None:
        raise CommandExecutionError('No suitable config file found')
    config = configparser.ConfigParser()
    try:
        config.read(conf_file)
    except (IOError, OSError) as exc:
        raise CommandExecutionError(
            'Unable to read from {0}: {1}'.format(conf_file, exc)
        )
    return config