On 6/22/09 11:48 AM, Nathan Yergler wrote: > I'm trying to use repoze.bfg.traversalwrapper instead of baking in > location awareness. It appears that the names used to identify > virtual host information drifted apart between repoze.bfg and > traversalwrapper. When trying to run I get a key error on > "virtual_root". Looking closer, it appears that repoze.bfg.router is > looking for: > > context, view_name, subpath, traversed, vroot, vroot_path = ( > tdict['context'], tdict['view_name'], tdict['subpath'], > tdict['traversed'], tdict['virtual_root'], > tdict['virtual_root_path']) > > And repoze.bfg.traversalwrapper is providing a dict with slightly > different keys: > > return dict(context=ob, view_name='', subpath=[], > traversed=traversed, > vroot=vroot, vroot_path=vroot_path, root=self.root) > > Changing vroot to virtual_root and vroot_path to virtual_root_path in > traversalwrapper seems to fix the problem. > > My question is about how to write a patch: > > a) Change keys used in repoze.bfg to match traversalwrapper (I suspect not) > b) Change keys used in traversalwrapper to match repoze.bfg (perhaps) > c) Update traversalwrapper to return *both* sets of keys > > I can see (c) being the correct choice if something other than > repoze.bfg is currently using traversalwrapper.
I think it's b) actually. Sorry about that. > I'd love to write a quick patch and get things updated, just need a > little guidance. I'll actually just check a fix in and make a release... although it'd be great to get you set up to be able to make checkins (http://repoze.org/contributing.html). - C _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev