aboutsummaryrefslogtreecommitdiffstats
path: root/python_moonclient
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
parentd28f8e68ac176a15dbbd7873f757f5a9f221d118 (diff)
Update code to 4.5 official version
Change-Id: I5075da0e2a3247ae1564f21b358748f482b75aa4
Diffstat (limited to 'python_moonclient')
-rw-r--r--python_moonclient/Changelog4
-rw-r--r--python_moonclient/python_moonclient/__init__.py2
-rw-r--r--python_moonclient/python_moonclient/core/config.py4
3 files changed, 8 insertions, 2 deletions
diff --git a/python_moonclient/Changelog b/python_moonclient/Changelog
index c58d83c4..9066e449 100644
--- a/python_moonclient/Changelog
+++ b/python_moonclient/Changelog
@@ -68,3 +68,7 @@ CHANGES
- moon object data list
- moon action data list
- moon metarule list
+
+1.4.1
+-----
+- Update exception during configuration
diff --git a/python_moonclient/python_moonclient/__init__.py b/python_moonclient/python_moonclient/__init__.py
index 8b353f9f..e3ad9307 100644
--- a/python_moonclient/python_moonclient/__init__.py
+++ b/python_moonclient/python_moonclient/__init__.py
@@ -3,4 +3,4 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.4.0"
+__version__ = "1.4.1"
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]