From c2b0c801400fcb59be8687f9faf061aa85bcffd2 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Fri, 30 Jan 2009 20:53:32 -0700 Subject: Started work on a much simplified mod_python server --- ipalib/config.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ipalib/config.py') diff --git a/ipalib/config.py b/ipalib/config.py index 735cf0a1..42d7ab57 100644 --- a/ipalib/config.py +++ b/ipalib/config.py @@ -432,8 +432,9 @@ class Env(object): self.site_packages = path.dirname(self.ipalib) self.script = path.abspath(sys.argv[0]) self.bin = path.dirname(self.script) - self.home = path.abspath(os.environ['HOME']) - self.dot_ipa = path.join(self.home, '.ipa') + self.home = os.environ.get('HOME', None) + self.etc = path.join('/', 'etc', 'ipa') + self.dot_ipa = self._join('home', '.ipa') self._merge(**overrides) if 'in_tree' not in self: if self.bin == self.site_packages and \ @@ -454,6 +455,10 @@ class Env(object): if 'conf_dir' not in self: self.conf_dir = base + def _join(self, key, *parts): + if key in self and self[key] is not None: + return path.join(self[key], *parts) + def _finalize_core(self, **defaults): """ Complete initialization of standard IPA environment. -- cgit