CLI: Always show a traceback for AssertionErrors.
These are bugs and the traceback is needed for bug reports. Signed-off-by: Chris PeBenito <pebenito@ieee.org>
This commit is contained in:
parent
3ffc134f16
commit
ad72e87efb
4
apol
4
apol
|
@ -52,6 +52,10 @@ logging.getLogger().addHandler(console_handler)
|
|||
try:
|
||||
sys.exit(setoolsgui.run_apol(args.policy))
|
||||
|
||||
except AssertionError:
|
||||
# Always provide a traceback for assertion errors
|
||||
raise
|
||||
|
||||
except Exception as err:
|
||||
if args.debug:
|
||||
raise
|
||||
|
|
|
@ -59,6 +59,10 @@ except setools.exception.InvalidCheckerConfig as err:
|
|||
|
||||
sys.exit(2)
|
||||
|
||||
except AssertionError:
|
||||
# Always provide a traceback for assertion errors
|
||||
raise
|
||||
|
||||
except Exception as err:
|
||||
if args.debug:
|
||||
raise
|
||||
|
|
4
sediff
4
sediff
|
@ -1498,6 +1498,10 @@ try:
|
|||
del diff.added_typebounds
|
||||
del diff.removed_typebounds
|
||||
|
||||
except AssertionError:
|
||||
# Always provide a traceback for assertion errors
|
||||
raise
|
||||
|
||||
except Exception as err:
|
||||
if args.debug:
|
||||
raise
|
||||
|
|
4
sedta
4
sedta
|
@ -121,6 +121,10 @@ try:
|
|||
print("\nGraph statistics:")
|
||||
print(g.get_stats())
|
||||
|
||||
except AssertionError:
|
||||
# Always provide a traceback for assertion errors
|
||||
raise
|
||||
|
||||
except Exception as err:
|
||||
if args.debug:
|
||||
raise
|
||||
|
|
4
seinfo
4
seinfo
|
@ -395,6 +395,10 @@ try:
|
|||
strfmt = " {0}" if not args.flat else "{0}"
|
||||
print(strfmt.format(result))
|
||||
|
||||
except AssertionError:
|
||||
# Always provide a traceback for assertion errors
|
||||
raise
|
||||
|
||||
except Exception as err:
|
||||
if args.debug:
|
||||
raise
|
||||
|
|
|
@ -153,6 +153,10 @@ try:
|
|||
print("\nGraph statistics:")
|
||||
print(g.get_stats())
|
||||
|
||||
except AssertionError:
|
||||
# Always provide a traceback for assertion errors
|
||||
raise
|
||||
|
||||
except Exception as err:
|
||||
if args.debug:
|
||||
raise
|
||||
|
|
Loading…
Reference in New Issue