diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-06-03 15:09:43 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-06-03 15:09:43 +0000 |
| commit | 77a668682d663b5a1f101e828354a9310bd04faa (patch) | |
| tree | 25af9f474320de8ab700a78e8be8f8c5138e3863 /repoze/bfg/urldispatch.py | |
| parent | 3b8d6d2f8a7e143334a2dba549249a312c4aa3c9 (diff) | |
| download | pyramid-77a668682d663b5a1f101e828354a9310bd04faa.tar.gz pyramid-77a668682d663b5a1f101e828354a9310bd04faa.tar.bz2 pyramid-77a668682d663b5a1f101e828354a9310bd04faa.zip | |
Revert urldispatch-context-as-dict-subclass committed in r5175. Let's not make that promise yet.
Diffstat (limited to 'repoze/bfg/urldispatch.py')
| -rw-r--r-- | repoze/bfg/urldispatch.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/repoze/bfg/urldispatch.py b/repoze/bfg/urldispatch.py index f108b965f..612843cfa 100644 --- a/repoze/bfg/urldispatch.py +++ b/repoze/bfg/urldispatch.py @@ -1,5 +1,7 @@ import re +from zope.component import queryUtility + from zope.interface import implements from zope.interface import alsoProvides from zope.interface import classProvides @@ -11,18 +13,16 @@ from routes import url_for from repoze.bfg.interfaces import IContextNotFound from repoze.bfg.interfaces import IContextURL from repoze.bfg.interfaces import IRoutesContext +from repoze.bfg.interfaces import IRoutesContextFactory from repoze.bfg.interfaces import ITraverser from repoze.bfg.interfaces import ITraverserFactory _marker = () -class DefaultRoutesContext(dict): +class DefaultRoutesContext(object): implements(IRoutesContext) - def __getattr__(self, name): - try: - return self[name] - except KeyError: - raise AttributeError(name) + def __init__(self, **kw): + self.__dict__.update(kw) class RoutesContextNotFound(object): implements(IContextNotFound) |
