aboutsummaryrefslogtreecommitdiffstats
path: root/python_moonclient/python_moonclient/core/config.py
diff options
context:
space:
mode:
authorThomas Duval <thomas.duval@orange.com>2018-06-19 16:13:31 +0200
committerThomas Duval <thomas.duval@orange.com>2018-06-19 16:30:55 +0200
commit2dbe655587ca98b67c1a3e3798c63fd47229adc0 (patch)
treedf374b5378225c9946ec0c97968bfa591fb9f9b6 /python_moonclient/python_moonclient/core/config.py
parentd28f8e68ac176a15dbbd7873f757f5a9f221d118 (diff)
Update code to 4.5 official version
Change-Id: I5075da0e2a3247ae1564f21b358748f482b75aa4
Diffstat (limited to 'python_moonclient/python_moonclient/core/config.py')
-rw-r--r--python_moonclient/python_moonclient/core/config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python_moonclient/python_moonclient/core/config.py b/python_moonclient/python_moonclient/core/config.py
index 300ebf1a..f8e3fe29 100644
--- a/python_moonclient/python_moonclient/core/config.py
+++ b/python_moonclient/python_moonclient/core/config.py
@@ -7,7 +7,9 @@ def get_configuration(consul_host, consul_port, key):
url = "http://{}:{}/v1/kv/{}".format(consul_host, consul_port, key)
req = requests.get(url)
if req.status_code != 200:
- raise Exception("xxx")
+ raise Exception("Exception when retrieving configuration from Consul: {} {}".format(
+ req.status_code, req.text
+ ))
data = req.json()
if len(data) == 1:
data = data[0]