From 35c7061f97a1f0dd79efe3a567b7054304192f55 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Fri, 13 Oct 2023 12:38:35 +1300 Subject: [PATCH] buildtools: Correctly raise exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This avoids errors like the following: ‘RuntimeError: No active exception to reraise’ Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- buildtools/wafsamba/samba_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index b22b7a8879b..f287e85d838 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -469,8 +469,7 @@ def RECURSE(ctx, directory): return ctx.recurse(relpath) if 'waflib.extras.compat15' in sys.modules: return ctx.recurse(relpath) - Logs.error('Unknown RECURSE context class: {}'.format(ctxclass)) - raise + raise Errors.WafError('Unknown RECURSE context class: {}'.format(ctxclass)) Options.OptionsContext.RECURSE = RECURSE Build.BuildContext.RECURSE = RECURSE -- 2.47.3