From c97355a4a2ba1a748dd1674bf59767a8285601b7 Mon Sep 17 00:00:00 2001 From: techbech Date: Thu, 1 Feb 2024 15:14:14 +0100 Subject: [PATCH] Remember to detach logger in --- NEWS.rst | 1 + src/wurf/waf_conf.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 58852e6..78580f0 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -6,6 +6,7 @@ of every change, see the Git log. Latest ------ +* Patch: Remember to detach logger in `project_version`. * Minor: Added project_version as a function on the Context object. * Patch: Added dependency paths for resolve conflicts. * Patch: Fix ``--no_resolve`` option. diff --git a/src/wurf/waf_conf.py b/src/wurf/waf_conf.py index 1c264bf..c05f8d4 100644 --- a/src/wurf/waf_conf.py +++ b/src/wurf/waf_conf.py @@ -186,6 +186,7 @@ def project_version(ctx): log_path = os.path.join(bldnode.abspath(), "version.log") + old_logger = ctx.logger ctx.logger = Logs.make_logger(path=log_path, name="version") ctx.logger.debug("wurf: project version execute") @@ -223,3 +224,5 @@ def project_version(ctx): except error.CmdAndLogError as e: ctx.logger.debug(f"wurf: project version failed: {e}") return None + finally: + ctx.logger = old_logger