diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-02-23 10:31:40 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-02-24 11:55:47 -0800 |
commit | b9d3a3e4ae0cb7c443d46ffe413e17749baab3ba (patch) | |
tree | c50277c090549037716bddfdb28ff9d066e93799 /tools | |
parent | f7cf644796fcdb6a0e30e4a7f218be74ac8cb31d (diff) | |
download | linux-b9d3a3e4ae0cb7c443d46ffe413e17749baab3ba.tar.gz linux-b9d3a3e4ae0cb7c443d46ffe413e17749baab3ba.tar.bz2 linux-b9d3a3e4ae0cb7c443d46ffe413e17749baab3ba.zip |
tools: ynl-gen: re-raise the exception instead of printing
traceback.print_exception() seems tricky to call, we're missing
some argument, so re-raise instead.
Reported-by: Chuck Lever III <chuck.lever@oracle.com>
Fixes: 3aacf8281336 ("tools: ynl: add an object hierarchy to represent parsed spec")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/net/ynl/lib/nlspec.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/net/ynl/lib/nlspec.py b/tools/net/ynl/lib/nlspec.py index e204679ad8b7..71da568e2c28 100644 --- a/tools/net/ynl/lib/nlspec.py +++ b/tools/net/ynl/lib/nlspec.py @@ -3,7 +3,6 @@ import collections import importlib import os -import traceback import yaml @@ -234,8 +233,7 @@ class SpecFamily(SpecElement): resolved.append(elem) if len(resolved) == 0: - traceback.print_exception(last_exception) - raise Exception("Could not resolve any spec element, infinite loop?") + raise last_exception def new_attr_set(self, elem): return SpecAttrSet(self, elem) |