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>
import collections
import importlib
import os
-import traceback
import yaml
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)