import telepathy
+_moduleLogger = logging.getLogger("handle")
+
+
class MetaMemoize(type):
"""
Allows a class to cache off instances for reuse
obj, newlyCreated = cls.__new__(cls, connection, *args)
if newlyCreated:
obj.__init__(connection, connection.get_handle_id(), *args)
- logging.info("New Handle %r" % obj)
+ _moduleLogger.info("New Handle %r" % obj)
return obj
name = property(telepathy.server.Handle.get_name)
-class SelfHandle(TheOneRingHandle):
+class ConnectionHandle(TheOneRingHandle):
instance = None
_HANDLE_TYPE_MAPPING = {
- 'self': SelfHandle,
+ 'connection': ConnectionHandle,
'contact': ContactHandle,
'list': ListHandle,
'group': GroupHandle,