From 23ab84757a4d216a7c5eea77e85aedfd3a9400ca Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Jun 2010 17:24:23 +0000 Subject: pass only match and route and document route minimally --- repoze/bfg/urldispatch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'repoze') diff --git a/repoze/bfg/urldispatch.py b/repoze/bfg/urldispatch.py index 458f1a7a5..51b6f9f84 100644 --- a/repoze/bfg/urldispatch.py +++ b/repoze/bfg/urldispatch.py @@ -51,7 +51,10 @@ class RoutesMapper(object): match = route.match(path) if match is not None: preds = route.predicates - info = {'route':route, 'match':match} + # NB: it is the intent that only 'match' be relied on + # by built-in predicates. 'route' and 'mapper' may be + # used by custom predicates. + info = {'match':match, 'route':route} if preds and not all((p(info, request) for p in preds)): continue return info -- cgit v1.2.3