diff options
| author | Chris McDonough <chrism@agendaless.com> | 2008-07-04 17:50:59 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2008-07-04 17:50:59 +0000 |
| commit | 8b2c67309a9a3f9cf709bf3003dc3275f17c709e (patch) | |
| tree | 1b20d5b000e4333cf50b2c2305dbb03e8b312144 /repoze/bfg/router.py | |
| parent | d6cb3c1b68e752922a149d37a8d208b7d01dbe14 (diff) | |
| download | pyramid-8b2c67309a9a3f9cf709bf3003dc3275f17c709e.tar.gz pyramid-8b2c67309a9a3f9cf709bf3003dc3275f17c709e.tar.bz2 pyramid-8b2c67309a9a3f9cf709bf3003dc3275f17c709e.zip | |
Don't depend on ZODB; shuffle policy responsibilities around a little.
Diffstat (limited to 'repoze/bfg/router.py')
| -rw-r--r-- | repoze/bfg/router.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/repoze/bfg/router.py b/repoze/bfg/router.py index 049430723..12d3d4ac4 100644 --- a/repoze/bfg/router.py +++ b/repoze/bfg/router.py @@ -2,12 +2,14 @@ from zope.component import getAdapter from repoze.bfg.interfaces import IWSGIApplication class Router: - def __init__(self, app, policy): + def __init__(self, app, root_finder, policy): self.app = app + self.root_finder = root_finder self.policy = policy def __call__(self, environ, start_response): - context, name, subpath = self.policy(environ) + root = self.root_finder(environ) + context, name, subpath = self.policy(root, environ) app = getAdapter(context, IWSGIApplication, name) environ['repoze.bfg.context'] = context environ['repoze.bfg.subpath'] = subpath |
