Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

change im_self for __self__

  • Loading branch information...
commit 1a912415c7d74c45440269f9b076e1333c680809 1 parent fdf6d8b
@tzicatl tzicatl authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 pyramid_handlers/__init__.py
View
12 pyramid_handlers/__init__.py
@@ -49,12 +49,12 @@ def add_handler(self, route_name, pattern, handler, action=None, **kw):
handler = self.maybe_dotted(handler)
action_decorator = getattr(handler, '__action_decorator__', None)
if action_decorator is not None:
- if hasattr(action_decorator, 'im_self'):
- # instance methods have an im_self == None
- # classmethods have an im_self == cls
- # staticmethods have no im_self
- # instances have no im_self
- if action_decorator.im_self is not handler:
+ if hasattr(action_decorator, '__self__'):
+ # instance methods have an __self__ == None
+ # classmethods have an __self__ == cls
+ # staticmethods have no __self__
+ # instances have no __self__
+ if action_decorator.__self__ is not handler:
raise ConfigurationError(
'The "__action_decorator__" attribute of a handler '
'must not be an instance method (must be a '
Please sign in to comment.
Something went wrong with that request. Please try again.