summaryrefslogtreecommitdiffstats
path: root/tools/net
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-02-23 19:31:40 +0100
committerJakub Kicinski <kuba@kernel.org>2023-02-24 20:55:47 +0100
commitb9d3a3e4ae0cb7c443d46ffe413e17749baab3ba (patch)
treec50277c090549037716bddfdb28ff9d066e93799 /tools/net
parenttools: ynl-gen: fix single attribute structs with attr 0 only (diff)
downloadlinux-b9d3a3e4ae0cb7c443d46ffe413e17749baab3ba.tar.xz
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/net')
-rw-r--r--tools/net/ynl/lib/nlspec.py4
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)