[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230223183141.1422857-3-kuba@kernel.org>
Date: Thu, 23 Feb 2023 10:31:40 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
Jakub Kicinski <kuba@...nel.org>,
Chuck Lever III <chuck.lever@...cle.com>
Subject: [PATCH net 2/3] 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@...cle.com>
Fixes: 3aacf8281336 ("tools: ynl: add an object hierarchy to represent parsed spec")
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
tools/net/ynl/lib/nlspec.py | 4 +---
1 file changed, 1 insertion(+), 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 @@ jsonschema = None
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)
--
2.39.2
Powered by blists - more mailing lists