python-modernize -f lib2to3.fixes.fix_methodattrs

This commit is contained in:
Tomas Kopecek 2017-05-03 11:37:55 +02:00
parent 67af38a1fe
commit e071f793ee

View file

@ -131,7 +131,7 @@ class HandlerRegistry(object):
if ret:
return ret
ret = tuple(inspect.getargspec(func))
if inspect.ismethod(func) and func.im_self:
if inspect.ismethod(func) and func.__self__:
# bound method, remove first arg
args, varargs, varkw, defaults = ret
if args: