Mercurial > kallithea
changeset 7361:2b07e757a85f
hooks: simplify app config code in _hook_environment - don't use relative_to
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 08 Aug 2018 02:23:11 +0200 |
parents | 03afcfc0d17f |
children | a19f1649c8d4 |
files | kallithea/lib/hooks.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/hooks.py Wed Aug 08 02:23:11 2018 +0200 +++ b/kallithea/lib/hooks.py Wed Aug 08 02:23:11 2018 +0200 @@ -380,9 +380,10 @@ from kallithea.model.base import init_model extras = _extract_extras() - path, ini_name = os.path.split(extras['config']) - conf = appconfig('config:%s' % ini_name, relative_to=path) - conf = load_environment(conf.global_conf, conf.local_conf) + ini_file_path = extras['config'] + #logging.config.fileConfig(ini_file_path) # Note: we are in a different process - don't use configured logging + app_conf = appconfig('config:%s' % ini_file_path) + conf = load_environment(app_conf.global_conf, app_conf.local_conf) setup_cache_regions(conf)