From 4aa9002ee042f219faf86be8dc7b85858e5945bd Mon Sep 17 00:00:00 2001 From: blumus Date: Mon, 5 Dec 2016 19:53:21 +0200 Subject: [PATCH 1/3] Issue#5: configution now includes all information --- requirements.txt | 1 + sensu/utils.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a96f1df..d23faca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ requests==0.13.8 simplejson==2.6.1 wsgiref==0.1.2 +dpath==1.4.0 diff --git a/sensu/utils.py b/sensu/utils.py index 2a25bee..dbbc258 100644 --- a/sensu/utils.py +++ b/sensu/utils.py @@ -24,6 +24,7 @@ import simplejson as json except ImportError: import json +import dpath def api_request(host=None, path='', method='get', \ data=None, params={}): @@ -70,7 +71,7 @@ def load_config(filename=None): def load_settings(): data = {} for cfg in get_config_files(): - data = dict(data.items() + load_config(cfg).items()) + dpath.util.merge(data,load_config(cfg)) return data def read_event(data=None): From 704c6b501610dbfa2cc3aef9d04aea1338a2980f Mon Sep 17 00:00:00 2001 From: blumus Date: Mon, 5 Dec 2016 20:41:41 +0200 Subject: [PATCH 2/3] removed use-mirror removed use-mirror - since its not supported by travis --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e472bca..648f3f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,7 @@ python: - "2.7" install: # Build/test dependencies - - pip install -r requirements.txt -r requirements-test.txt --use-mirrors -script: ./test.sh -v + - pip install -r requirements.txt -r requirements-test.txt notifications: irc: channels: "irc.freenode.org#vitasso" From a9e45bee8c7287067c75d70b21356bfe85957b36 Mon Sep 17 00:00:00 2001 From: blumus Date: Mon, 5 Dec 2016 20:53:37 +0200 Subject: [PATCH 3/3] added test.sh script else travis fails --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 648f3f8..46e72b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,3 +9,5 @@ notifications: channels: "irc.freenode.org#vitasso" on_success: change on_failure: change +script: + - ./test.sh