changeset 8160:a5e719bc7b40

config: fix pyflakes warning about unused tg import app_cfg had an unused 'import tg'. tg.hooks was used, but through a separate import. Clean that up by consistently using tg (which always makes tg.hooks available) and dropping the separate hooks import.
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 01 Feb 2020 14:39:46 +0100
parents a8c8b32aee5a
children 2786730e56e0
files kallithea/config/app_cfg.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/config/app_cfg.py	Tue Feb 04 03:06:29 2020 +0100
+++ b/kallithea/config/app_cfg.py	Sat Feb 01 14:39:46 2020 +0100
@@ -28,7 +28,6 @@
 from alembic.migration import MigrationContext
 from alembic.script.base import ScriptDirectory
 from sqlalchemy import create_engine
-from tg import hooks
 from tg.configuration import AppConfig
 from tg.support.converters import asbool
 
@@ -187,7 +186,7 @@
     kallithea.model.meta.Session.remove()
 
 
-hooks.register('configure_new_app', setup_configuration)
+tg.hooks.register('configure_new_app', setup_configuration)
 
 
 def setup_application(app):
@@ -211,4 +210,4 @@
     return app
 
 
-hooks.register('before_config', setup_application)
+tg.hooks.register('before_config', setup_application)