diff --git a/mitogen/__init__.py b/mitogen/__init__.py index 47fe4d38..5e2e29b6 100644 --- a/mitogen/__init__.py +++ b/mitogen/__init__.py @@ -111,10 +111,10 @@ def main(log_level='INFO', profiling=_default_profiling): if profiling: mitogen.core.enable_profiling() mitogen.master.Router.profiling = profiling - utils.log_to_file(level=log_level) + mitogen.utils.log_to_file(level=log_level) return mitogen.core._profile_hook( 'app.main', - utils.run_with_router, + mitogen.utils.run_with_router, func, ) return wrapper diff --git a/mitogen/debug.py b/mitogen/debug.py index 3d13347f..dbab550e 100644 --- a/mitogen/debug.py +++ b/mitogen/debug.py @@ -230,7 +230,7 @@ class ContextDebugger(object): def _handle_debug_msg(self, msg): try: method, args, kwargs = msg.unpickle() - msg.reply(getattr(cls, method)(*args, **kwargs)) + msg.reply(getattr(self, method)(*args, **kwargs)) except Exception: e = sys.exc_info()[1] msg.reply(mitogen.core.CallError(e)) diff --git a/mitogen/unix.py b/mitogen/unix.py index 7be4a464..1f48c6b2 100644 --- a/mitogen/unix.py +++ b/mitogen/unix.py @@ -85,7 +85,7 @@ class Listener(mitogen.core.Protocol): path = make_socket_path() sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) if os.path.exists(path) and is_path_dead(path): - LOG.debug('%r: deleting stale %r', self, path) + LOG.debug('%r: deleting stale %r', cls.__name__, path) os.unlink(path) sock.bind(path)