callable() has been removed in Python 3, but was reintroduced in Python 3.2. This fix (check for isinstance(obj, collections.Callable) should make the test work with 3.1 and older versions of 3.
(acked on jabber)
import errno
import threading
import isc.cc
+import collections
#
# Currently only the subscription part and some sending is implemented...
# (except explicitely overridden ones)
def __getattr__(self, name, *args):
attr = getattr(self.socket, name)
- if callable(attr):
+ if isinstance(attr, collections.Callable):
def callable_attr(*args):
return attr.__call__(*args)
return callable_attr