From 403aa2a2e06fcd6433f2115213a1a88ccb997218 Mon Sep 17 00:00:00 2001 From: Mathieu Mitchell Date: Mon, 16 Oct 2017 20:15:26 -0400 Subject: [PATCH] Fix string formatting in error messages Currently, error messages are returned with the string formatting templates as-is. This seems like a last-minute line-length wrapping issue. This commit fixes the string formatting. Change-Id: I606f4b9be4e5597348ea42b41667c054965d2083 --- hooks/percona_utils.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hooks/percona_utils.py b/hooks/percona_utils.py index 36e8207..8ed7391 100644 --- a/hooks/percona_utils.py +++ b/hooks/percona_utils.py @@ -746,16 +746,15 @@ def cluster_ready(): uuids.append(bootstrap_uuid) if len(uuids) < min_size: - log("Fewer than minimum cluster size:{} percona units reporting " - "clustered".format(min_size), + log("Fewer than minimum cluster size: " + "{} percona units reporting clustered".format(min_size), DEBUG) return False elif len(set(uuids)) > 1: - raise Exception("Found inconsistent bootstrap uuids - %s" - "".format((uuids))) + raise Exception("Found inconsistent bootstrap uuids: " + "{}".format((uuids))) else: - log("All {} percona units reporting clustered" - "".format(min_size), + log("All {} percona units reporting clustered".format(min_size), DEBUG) return True