Log warning/traceback when failing to include a configured view
This commit is contained in:
parent
e38cfda076
commit
8f4b223125
|
@ -31,6 +31,7 @@ import datetime
|
|||
import six
|
||||
import pytz
|
||||
import humanize
|
||||
import logging
|
||||
|
||||
from rattail.time import timezone, make_utc
|
||||
from rattail.files import resource_path
|
||||
|
@ -41,6 +42,9 @@ from pyramid.interfaces import IRoutesMapper
|
|||
from webhelpers2.html import HTML, tags
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_csrf_token(request):
|
||||
"""
|
||||
Convenience function to retrieve the effective CSRF token for the given
|
||||
|
@ -269,6 +273,9 @@ def include_configured_views(pyramid_config):
|
|||
|
||||
for setting in settings:
|
||||
if setting.value:
|
||||
pyramid_config.include(setting.value)
|
||||
try:
|
||||
pyramid_config.include(setting.value)
|
||||
except:
|
||||
log.warning("pyramid failed to include: %s", exc_info=True)
|
||||
|
||||
session.close()
|
||||
|
|
Loading…
Reference in a new issue