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: 3aacf82813
("tools: ynl: add an object hierarchy to represent parsed spec")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f7cf644796
commit
b9d3a3e4ae
@ -3,7 +3,6 @@
|
|||||||
import collections
|
import collections
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
import traceback
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
@ -234,8 +233,7 @@ class SpecFamily(SpecElement):
|
|||||||
resolved.append(elem)
|
resolved.append(elem)
|
||||||
|
|
||||||
if len(resolved) == 0:
|
if len(resolved) == 0:
|
||||||
traceback.print_exception(last_exception)
|
raise last_exception
|
||||||
raise Exception("Could not resolve any spec element, infinite loop?")
|
|
||||||
|
|
||||||
def new_attr_set(self, elem):
|
def new_attr_set(self, elem):
|
||||||
return SpecAttrSet(self, elem)
|
return SpecAttrSet(self, elem)
|
||||||
|
Loading…
Reference in New Issue
Block a user