Issue #661 resolved

Cannot create tool out of an object callable

created an issue

The folowing:



import cherrypy

class A (object): def init(self): pass def call(self): pass

a = A() = cherrypy._cptools.HandlerTool(a) }}}

fails with

{{{ Traceback (most recent call last): File "", line 10, in ? = cherrypy._cptools.HandlerTool(a) File "/home/npat/lib/python/cherrypy/", line 119, in init Tool.init(self, 'before_handler', callable, name) File "/home/npat/lib/python/cherrypy/", line 45, in init self._setargs() File "/home/npat/lib/python/cherrypy/", line 51, in _setargs for arg in inspect.getargspec(self.callable)[0]: File "/usr/lib/python2.3/", line 663, in getargspec raise TypeError('arg is not a Python function') TypeError: arg is not a Python function }}}

Comments (2)

  1. Log in to comment