Nat McLean
2011-09-23 377aa5d9205d8b6b236d75e5502152b05211066e
fixed config.views.requestonly
1 files modified
5 ■■■■■ changed files
pyramid/config/views.py 5 ●●●●● patch | view | raw | blame | history
pyramid/config/views.py
@@ -416,7 +416,7 @@
def requestonly(view, attr=None):
    if attr is None:
        attr = '__call__'
    if inspect.isfunction(view):
    if inspect.isroutine(view):
        fn = view
    elif inspect.isclass(view):
        try:
@@ -436,8 +436,7 @@
    args = argspec[0]
    if hasattr(fn, 'im_func'):
        # it's an instance method
    if inspect.ismethod(fn):
        if not args:
            return False
        args = args[1:]