From 8b4fad5636f5e434c3316c0015d286eef797d8e1 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 5 Mar 2023 14:33:14 +0100 Subject: writable_dirs: refactoring --- writable_dirs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/writable_dirs.py b/writable_dirs.py index 8313707..ed3ab89 100755 --- a/writable_dirs.py +++ b/writable_dirs.py @@ -47,7 +47,7 @@ def launch_logging_thread(queue): @contextlib.contextmanager -def set_up_logging(queue): +def setup_logging(queue): config = { 'version': 1, 'handlers': { @@ -230,7 +230,7 @@ def access_loop(access_queue, scandir_queue): def access_main(args, log_queue, access_queue, scandir_queue): - with close_queue(scandir_queue), set_up_logging(log_queue): + with close_queue(scandir_queue), setup_logging(log_queue): drop_privileges(args.uid, args.gid) dump_process_info() access_loop(access_queue, scandir_queue) @@ -256,7 +256,7 @@ def scandir_main(access_queue, scandir_queue): def main(argv=None): log_queue = mp.Queue() - with launch_logging_thread(log_queue), set_up_logging(log_queue): + with launch_logging_thread(log_queue), setup_logging(log_queue): prog_args = parse_args(argv) access_queue = mp.SimpleQueue() scandir_queue = mp.SimpleQueue() -- cgit v1.2.3