diff options
author | kali <kali@leap.se> | 2012-11-14 00:38:20 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-11-14 00:38:20 +0900 |
commit | 21875404282522a9c83bfb9c85d6a24fa59d20f8 (patch) | |
tree | ae0409bd742ce3a6f994ae9bb31fc5ab7225f1c6 /src/leap/base/config.py | |
parent | f6e900f024074435349eb778a2d89baed55e1e6c (diff) | |
parent | d24c7328fa845737dbb83d512e4b3f287634c4cc (diff) |
Merge branch 'feature/generic-wizard' into develop
The generic wizard (big) branch is now stabilised.
A bunch of refactors have gone together with this topic branch:
- client does not have any info included for default service providers.
- user has to run the first-run wizard and manually entry domain for sample provider.
- remove all remains of the older branding strategy for default provider.
- srp registration + authentication are integrated with the signup process.
Diffstat (limited to 'src/leap/base/config.py')
-rw-r--r-- | src/leap/base/config.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/leap/base/config.py b/src/leap/base/config.py index cf01d1aa..0255fbab 100644 --- a/src/leap/base/config.py +++ b/src/leap/base/config.py @@ -118,6 +118,7 @@ class JSONLeapConfig(BaseLeapConfig): " derived class") assert issubclass(self.spec, PluggableConfig) + self.domain = kwargs.pop('domain', None) self._config = self.spec(format="json") self._config.load() self.fetcher = kwargs.pop('fetcher', requests) @@ -252,6 +253,15 @@ def get_default_provider_path(): return default_provider_path +def get_provider_path(domain): + # XXX if not domain, return get_default_provider_path + default_subpath = os.path.join("providers", domain) + provider_path = get_config_file( + '', + folder=default_subpath) + return provider_path + + def validate_ip(ip_str): """ raises exception if the ip_str is |