Issue proper warning if old 'edbob.config' setting is found
This commit is contained in:
parent
b5cea62de7
commit
9b50067bd7
|
@ -27,7 +27,7 @@ Application Entry Point
|
|||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import os
|
||||
import logging
|
||||
import warnings
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
@ -49,9 +49,6 @@ from tailbone.auth import TailboneAuthorizationPolicy
|
|||
from tailbone.forms import renderers
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def make_rattail_config(settings):
|
||||
"""
|
||||
Make a Rattail config object from the given settings.
|
||||
|
@ -67,8 +64,9 @@ def make_rattail_config(settings):
|
|||
if not path or not os.path.exists(path):
|
||||
raise ConfigurationError("Please set 'rattail.config' in [app:main] section of config "
|
||||
"to the path of your config file. Lame, but necessary.")
|
||||
log.warning("using fallback 'edbob.config' setting, but would prefer the "
|
||||
"'rattail.config' setting under [app:main] if possible...")
|
||||
warnings.warn("[app:main] setting 'edbob.config' is deprecated; "
|
||||
"please use 'rattail.config' setting instead",
|
||||
DeprecationWarning)
|
||||
rattail_config = make_config(path)
|
||||
settings['rattail_config'] = rattail_config
|
||||
rattail_config.configure_logging()
|
||||
|
|
Loading…
Reference in a new issue