Exemple #1
0
def get_local_corosync_conf():
    """
    Read corosync.conf file from local machine
    """
    path = settings.corosync_conf_file
    try:
        return open(path).read()
    except IOError as e:
        raise LibraryError(reports.corosync_config_read_error(path, e.strerror))
Exemple #2
0
def get_local_corosync_conf():
    """
    Read corosync.conf file from local machine
    """
    path = settings.corosync_conf_file
    try:
        return open(path).read()
    except EnvironmentError as e:
        raise LibraryError(reports.corosync_config_read_error(
            path, e.strerror))
Exemple #3
0
def get_local_corosync_conf():
    """
    Read corosync.conf file from local machine
    """
    path = settings.corosync_conf_file
    try:
        with open(path, "r", encoding="utf-8") as a_file:
            return a_file.read()
    except EnvironmentError as e:
        raise LibraryError(reports.corosync_config_read_error(
            path, e.strerror))