summaryrefslogtreecommitdiff
path: root/src/leap/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/base')
-rw-r--r--src/leap/base/config.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/leap/base/config.py b/src/leap/base/config.py
index 465016db..c7871f22 100644
--- a/src/leap/base/config.py
+++ b/src/leap/base/config.py
@@ -111,6 +111,13 @@ class JSONLeapConfig(BaseLeapConfig):
folder, filename = os.path.split(to)
if folder and not os.path.isdir(folder):
mkdir_p(folder)
+ # lazy evaluation until first level nest
+ # to allow lambdas with context-dependant info
+ # like os.path.expanduser
+ config = self.get_config()
+ for k, v in config.iteritems():
+ if callable(v):
+ config[k] = v()
self._config.serialize(to)
def load(self, fromfile=None):