From d38fb3772a5856daeec1d70c42a97ed2345eaec6 Mon Sep 17 00:00:00 2001
From: Sebastian Lobinger <sebastian.lobinger@zib.de>
Date: Fri, 18 Aug 2017 09:29:55 +0200
Subject: [PATCH] update implementation of ConfigProvider to pass tests fix
 issue #3

---
 config_provider.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/config_provider.py b/config_provider.py
index d45df3e..1399ab3 100644
--- a/config_provider.py
+++ b/config_provider.py
@@ -1,8 +1,14 @@
 class ConfigProvider:
 
-  def __init__(self, load_function, *args, **kwargs):
-    self._conf_dict = load_function(*args, **kwargs)
+  def __init__(self, load_function):
+    self._conf_dict = load_function['function'](
+      *load_function.get('args'), **load_function.get('kwargs'))
+    self._load_function = load_function
 
   @property
   def dict(self):
-    return self._conf_dict
\ No newline at end of file
+    return self._conf_dict
+
+  def reload(self):
+    self._conf_dict = self._load_function['function'](
+      *self._load_function.get('args'), **self._load_function.get('kwargs'))
\ No newline at end of file
-- 
GitLab