Making the code slightly easier to maintain
[theonering] / src / handle.py
index 9baf35b..cfbcecc 100644 (file)
@@ -7,7 +7,7 @@ import tp
 import util.misc as misc_utils
 
 
-_moduleLogger = logging.getLogger("handle")
+_moduleLogger = logging.getLogger(__name__)
 
 
 class TheOneRingHandle(tp.Handle):
@@ -72,7 +72,7 @@ def create_handle_factory():
 
        cache = weakref.WeakValueDictionary()
 
-       def create_handle(connection, type, *args):
+       def _create_handle(connection, type, *args):
                Handle = _HANDLE_TYPE_MAPPING[type]
                key = Handle, connection.username, args
                try:
@@ -88,7 +88,7 @@ def create_handle_factory():
                _moduleLogger.debug("Created Handle: %r (%s)" % (handle, handleStatus))
                return handle
 
-       return create_handle
+       return _create_handle
 
 
 create_handle = create_handle_factory()