diff --git a/kallithea/bin/kallithea_cli_base.py b/kallithea/bin/kallithea_cli_base.py --- a/kallithea/bin/kallithea_cli_base.py +++ b/kallithea/bin/kallithea_cli_base.py @@ -75,7 +75,7 @@ def register_command(config_file=False, logging.config.fileConfig(io.StringIO(config_string), {'__file__': path_to_ini_file, 'here': os.path.dirname(path_to_ini_file)}) if config_file_initialize_app: - kallithea.config.middleware.make_app_without_logging(kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) + kallithea.config.middleware.make_app(kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) return annotated(*args, **kwargs) return cli_command(runtime_wrapper) return annotator diff --git a/kallithea/bin/kallithea_cli_db.py b/kallithea/bin/kallithea_cli_db.py --- a/kallithea/bin/kallithea_cli_db.py +++ b/kallithea/bin/kallithea_cli_db.py @@ -67,7 +67,7 @@ def db_create(user, password, email, rep Session().commit() # initial repository scan - kallithea.config.middleware.make_app_without_logging( + kallithea.config.middleware.make_app( kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) added, _ = kallithea.lib.utils.repo2db_mapper(kallithea.model.scm.ScmModel().repo_scan()) if added: diff --git a/kallithea/config/middleware.py b/kallithea/config/middleware.py --- a/kallithea/config/middleware.py +++ b/kallithea/config/middleware.py @@ -24,11 +24,6 @@ __all__ = ['make_app'] make_base_app = base_config.setup_tg_wsgi_app(load_environment) -def make_app_without_logging(global_conf, full_stack=True, **app_conf): - """The core of make_app for use from gearbox commands (other than 'serve')""" - return make_base_app(global_conf, full_stack=full_stack, **app_conf) - - def make_app(global_conf, full_stack=True, **app_conf): """ Set up Kallithea with the settings found in the PasteDeploy configuration @@ -47,4 +42,4 @@ def make_app(global_conf, full_stack=Tru ``app_conf`` contains all the application-specific settings (those defined under ``[app:main]``. """ - return make_app_without_logging(global_conf, full_stack=full_stack, **app_conf) + return make_base_app(global_conf, full_stack=full_stack, **app_conf) diff --git a/kallithea/lib/hooks.py b/kallithea/lib/hooks.py --- a/kallithea/lib/hooks.py +++ b/kallithea/lib/hooks.py @@ -310,7 +310,7 @@ def _hook_environment(repo_path): path_to_ini_file = extras['config'] kallithea.CONFIG = paste.deploy.appconfig('config:' + path_to_ini_file) #logging.config.fileConfig(ini_file_path) # Note: we are in a different process - don't use configured logging - kallithea.config.middleware.make_app_without_logging(kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) + kallithea.config.middleware.make_app(kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) repo_path = safe_unicode(repo_path) # fix if it's not a bare repo