changeset 8145:e488be112e5e

config: drop make_app_without_logging - 69704bc113ea made it redundant
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 25 Jan 2020 20:15:51 +0100
parents fa421677f97d
children 24db2cd42881
files kallithea/bin/kallithea_cli_base.py kallithea/bin/kallithea_cli_db.py kallithea/config/middleware.py kallithea/lib/hooks.py
diffstat 4 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/bin/kallithea_cli_base.py	Sat Jan 25 19:45:03 2020 +0100
+++ b/kallithea/bin/kallithea_cli_base.py	Sat Jan 25 20:15:51 2020 +0100
@@ -75,7 +75,7 @@
                 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
--- a/kallithea/bin/kallithea_cli_db.py	Sat Jan 25 19:45:03 2020 +0100
+++ b/kallithea/bin/kallithea_cli_db.py	Sat Jan 25 20:15:51 2020 +0100
@@ -67,7 +67,7 @@
     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:
--- a/kallithea/config/middleware.py	Sat Jan 25 19:45:03 2020 +0100
+++ b/kallithea/config/middleware.py	Sat Jan 25 20:15:51 2020 +0100
@@ -24,11 +24,6 @@
 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 @@
     ``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)
--- a/kallithea/lib/hooks.py	Sat Jan 25 19:45:03 2020 +0100
+++ b/kallithea/lib/hooks.py	Sat Jan 25 20:15:51 2020 +0100
@@ -310,7 +310,7 @@
     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