Merge "Make class detection more accurate"

This commit is contained in:
Jenkins 2016-02-12 01:34:50 +00:00 committed by Gerrit Code Review
commit 24ef876d37

View File

@ -148,7 +148,7 @@ def trace_cls(name, info=None, hide_args=False, trace_private=False):
"""
def decorator(cls):
clss = cls if type(cls) is type else cls.__class__
clss = cls if inspect.isclass(cls) else cls.__class__
mro_dicts = [c.__dict__ for c in inspect.getmro(clss)]
for attr_name, attr in inspect.getmembers(cls):
if not (inspect.ismethod(attr) or inspect.isfunction(attr)):