diff options
author | kali <kali@leap.se> | 2012-08-30 00:36:50 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-08-30 00:42:29 +0900 |
commit | 1263cd7a3cfca81ae3e6976a489e2d3d4013d64b (patch) | |
tree | 95e6897a949d8772248a52ee714eec19bd2c6e72 /src/leap/eip/checks.py | |
parent | ed4ad3a392caf0211e51a48d2d7b6c5a2f7bb17a (diff) |
add lazy evaluation to config specs
now callables are allowed in specs *only at one level depth*
to allow for last-minute evaluation on context-sensitive data,
like paths affected by os.environ
also some minor modifications to make check tests pass after
putting the new jsonconfig-based eipconfig in place.
aaaaaall green again :)
Diffstat (limited to 'src/leap/eip/checks.py')
-rw-r--r-- | src/leap/eip/checks.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/leap/eip/checks.py b/src/leap/eip/checks.py index e5b8e971..b92ea706 100644 --- a/src/leap/eip/checks.py +++ b/src/leap/eip/checks.py @@ -52,7 +52,7 @@ class EIPConfigChecker(object): self.config = None self.fetcher = fetcher - #self.eipconfig = eipconfig.EIPConfig() + self.eipconfig = eipconfig.EIPConfig() def run_all(self, checker=None, skip_download=False): """ @@ -211,14 +211,17 @@ class EIPConfigChecker(object): def _is_there_default_eipconfig(self): #XXX - #self.eipconfig.exists() - return os.path.isfile( - self._get_default_eipconfig_path()) + return self.eipconfig.exists() + #return os.path.isfile( + #self._get_default_eipconfig_path()) def _dump_default_eipconfig(self): #XXX self.eipconfig.save() - eipconfig.dump_default_eipconfig( - self._get_default_eipconfig_path()) + logger.debug('saving eipconfig') + #import ipdb;ipdb.set_trace() + self.eipconfig.save() + #eipconfig.dump_default_eipconfig( + #self._get_default_eipconfig_path()) def _get_provider_definition_uri(self, domain=None, path=None): if domain is None: |