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