Permalink
Browse files

Alleviate mcdonc headaches.

  • Loading branch information...
1 parent 45a7367 commit fb33d86e6e8e910f56f4f4c3be10ffdd00f535d4 @bbangert bbangert committed Mar 23, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 pyramid_handlers/__init__.py
View
6 pyramid_handlers/__init__.py
@@ -125,12 +125,12 @@ def locate_view_by_name(config, handler, route_name, action_decorator, name):
method_name = '__call__'
# Scan the controller for any other methods with this action name
- for meth_name, method in inspect.getmembers(handler, inspect.ismethod):
+ for attr, method in inspect.getmembers(handler, inspect.ismethod):
configs = getattr(method, '__exposed__', [{}])
for expose_config in configs:
# Don't re-register the same view if this method name is
# the action name
- if meth_name == name:
+ if attr == name:
continue
# We only reg a view if the name matches the action
if expose_config.get('name') != method_name:
@@ -139,7 +139,7 @@ def locate_view_by_name(config, handler, route_name, action_decorator, name):
# so we copy each
view_args = expose_config.copy()
del view_args['name']
- config.add_view(view=handler, attr=meth_name,
+ config.add_view(view=handler, attr=attr,
route_name=route_name,
decorator=action_decorator, **view_args)

0 comments on commit fb33d86

Please sign in to comment.