From 25edbe72cd6717cc4da5134bae1c791a32faf128 Mon Sep 17 00:00:00 2001 From: Yang Hongyang Date: Thu, 7 Jan 2016 14:40:30 +0800 Subject: [PATCH] Fix the content of 'discovery_endpoint' not show up in exception When failed to get discovery url, magnum returns: $ magnum bay-create --name swarmbay --baymodel swarmbaymodel --node-count 3 ERROR: Fail to get discovery url from %(discovery_endpoint) (HTTP 500) where %(discovery_endpoint) should be replaced by the actual discovery_endpoint, like below: $ magnum bay-create --name swarmbay --baymodel swarmbaymodel --node-count 3 ERROR: Failed to get discovery url from 'https://discovery.etcd.io/new?size=1'. (HTTP 500) also: Fail -> Failed Change-Id: I68f85af33ff30227bae19ac0da588b942c7c189d Closes-Bug: #1531725 --- magnum/common/exception.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magnum/common/exception.py b/magnum/common/exception.py index 184183a170..d40d0ea93b 100644 --- a/magnum/common/exception.py +++ b/magnum/common/exception.py @@ -284,7 +284,7 @@ class InvalidDiscoveryURL(Invalid): class GetDiscoveryUrlFailed(MagnumException): - message = _("Fail to get discovery url from %(discovery_endpoint)") + message = _("Failed to get discovery url from '%(discovery_endpoint)s'.") class InvalidUuidOrName(Invalid):