summaryrefslogtreecommitdiff
path: root/repoze/bfg/configuration.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-10-31 16:21:51 +0000
committerChris McDonough <chrism@agendaless.com>2009-10-31 16:21:51 +0000
commitad406f50aea5db8b399e7f9d502c06b6253f8a21 (patch)
tree6399e252c3e068fa5b789b305b543de4ec154950 /repoze/bfg/configuration.py
parent6db2c53850b33015faf8db627c5cf2fda00fc295 (diff)
downloadpyramid-ad406f50aea5db8b399e7f9d502c06b6253f8a21.tar.gz
pyramid-ad406f50aea5db8b399e7f9d502c06b6253f8a21.tar.bz2
pyramid-ad406f50aea5db8b399e7f9d502c06b6253f8a21.zip
Fix default root factory in the face of changes to root factory construction arg.
Diffstat (limited to 'repoze/bfg/configuration.py')
-rw-r--r--repoze/bfg/configuration.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py
index 7ea74853c..077b72438 100644
--- a/repoze/bfg/configuration.py
+++ b/repoze/bfg/configuration.py
@@ -127,12 +127,12 @@ def make_registry(root_factory, package=None, filename='configure.zcml',
class DefaultRootFactory:
__parent__ = None
__name__ = None
- def __init__(self, environ):
- if 'bfg.routes.matchdict' in environ:
- # provide backwards compatibility for applications which
- # used routes (at least apps without any custom "context
- # factory") in BFG 0.9.X and before
- self.__dict__.update(environ['bfg.routes.matchdict'])
+ def __init__(self, request):
+ matchdict = getattr(request, 'matchdict', {})
+ # provide backwards compatibility for applications which
+ # used routes (at least apps without any custom "context
+ # factory") in BFG 0.9.X and before
+ self.__dict__.update(matchdict)
def zcml_configure(name, package):
""" Given a ZCML filename as ``name`` and a Python package as