# HG changeset patch # User Mads Kiilerich # Date 2020-03-31 17:43:31 # Node ID 75e46ebf176d8c13a988479f84c9aee476c7e8ae # Parent 80ffe0f29857aadc708f49651796ca6def535f9d middleware: verify as early as possible in app initialization that the necessary configuration is provided In addition to verifying a random config setting, also verify that config has been read as Paste does it, an invariant introduced in 488b52cad890. diff --git a/kallithea/config/middleware.py b/kallithea/config/middleware.py --- a/kallithea/config/middleware.py +++ b/kallithea/config/middleware.py @@ -42,4 +42,6 @@ def make_app(global_conf, full_stack=Tru ``app_conf`` contains all the application-specific settings (those defined under ``[app:main]``. """ + assert app_conf.get('sqlalchemy.url') # must be called with a Kallithea .ini file, which for example must have this config option + assert global_conf.get('here') and global_conf.get('__file__') # app config should be initialized the paste way ... return make_base_app(global_conf, full_stack=full_stack, **app_conf)