Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/cornice/service.py b/cornice/service.py
- index 3e14681..ade2551 100644
- --- a/cornice/service.py
- +++ b/cornice/service.py
- @@ -216,7 +216,6 @@ class Service(object):
- def callback(context, name, ob):
- config = context.config.with_package(info.module)
- config.add_cornice_service(self)
- -
- info = venusian.attach(self, callback, category='pyramid',
- depth=depth)
- @@ -530,15 +529,16 @@ def decorate_view(view, args, method):
- # location (if the view argument isn't a callable)
- ob = None
- view_ = view
- - if 'klass' in args and not callable(view):
- + if 'klass' in args:
- params = dict(request=request)
- if 'factory' in args and 'acl' not in args:
- params['context'] = request.context
- ob = args['klass'](**params)
- - if is_string(view):
- - view_ = getattr(ob, view.lower())
- - elif isinstance(view, _UnboundView):
- - view_ = view.make_bound_view(ob)
- + if not callable(view):
- + if is_string(view):
- + view_ = getattr(ob, view.lower())
- + elif isinstance(view, _UnboundView):
- + view_ = view.make_bound_view(ob)
- # set data deserializer
- if 'deserializer' in args:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement