]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
buildtools: Correctly raise exception
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 12 Oct 2023 23:38:35 +0000 (12:38 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 17 Oct 2023 03:19:38 +0000 (03:19 +0000)
This avoids errors like the following:
‘RuntimeError: No active exception to reraise’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_utils.py

index b22b7a8879b1db373b9396ff2d68ac6928076b82..f287e85d8381704b92e78af1cb75bf022d4113e7 100644 (file)
@@ -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