Issue #128 resolved

Incorrect attribute/method check in aspect module

mic
created an issue

There is minor mistake in line 48 of apect.py module. Instead of:

    # if requested attribute is not a method, simply return it
    if not callable(method):
        return method

it should be: # if requested attribute is not a method, simply return it if type(method) not in (types.FunctionType, types.MethodType): return method

Otherwise class attributes are treated as callable types which is mistake (because class itself IS callable type).

Comments (3)

  1. Anonymous

    Given the deprecation of the aspect module in IrcSession20050519, I suggest we close this Ticket as wontfix. But I'll let a senior developer do the deed.

  2. Log in to comment