Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

catch the right one

git-svn-id: https://svn.bluedynamics.eu/svn/module/bda.bfg.tile/trunk@344 f119a143-da5b-4457-81e3-bee00661a780
  • Loading branch information...
commit a8639887fd5e7a53b4ff2132bc633b6ac97b3e1d 1 parent 65e18bc
jensens authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/bda/bfg/tile/_api.py
View
5 src/bda/bfg/tile/_api.py
@@ -20,6 +20,7 @@
)
from repoze.bfg.settings import get_settings
from repoze.bfg.configuration import _secure_view
+from repoze.bfg.exceptions import Forbidden
from repoze.bfg.threadlocal import get_current_registry
from repoze.bfg.path import caller_package
from repoze.bfg.renderers import template_renderer_factory
@@ -137,11 +138,11 @@ def _consume_unauthorized(tile):
def consumer(context, request):
try:
tile(context, request)
- except Unauthorized, e:
+ except Forbidden, e:
settings = get_settings()
if settings['debug_authorization']:
logger = IDebugLogger()
- logger.debug(u'Unauthorized tile %s called, ' % repr(tile) +
+ logger.debug(u'Forbidden tile %s called, ' % repr(tile) +
u'returns empty string. Full exception:\n %s' % e)
return u''
return consumer
Please sign in to comment.
Something went wrong with that request. Please try again.