Skip to content

Commit b9d3a3e

Browse files
committed
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 <[email protected]> Fixes: 3aacf82 ("tools: ynl: add an object hierarchy to represent parsed spec") Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f7cf644 commit b9d3a3e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tools/net/ynl/lib/nlspec.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import collections
44
import importlib
55
import os
6-
import traceback
76
import yaml
87

98

@@ -234,8 +233,7 @@ def __init__(self, spec_path, schema_path=None):
234233
resolved.append(elem)
235234

236235
if len(resolved) == 0:
237-
traceback.print_exception(last_exception)
238-
raise Exception("Could not resolve any spec element, infinite loop?")
236+
raise last_exception
239237

240238
def new_attr_set(self, elem):
241239
return SpecAttrSet(self, elem)

0 commit comments

Comments
 (0)