lib: Fix silent assertitons
There are a couple of assert statements in the codebase which can make jw-pkg fail without any detail whatsoever if --backtrace is not specified, fix that.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
120a6e4d34
commit
3ac3aff997
7 changed files with 19 additions and 12 deletions
|
|
@ -145,7 +145,9 @@ class App: # export
|
|||
except Exception as e:
|
||||
log(ERR, 'Failed: {}'.format(repr(e) if self.__back_trace else str(e)))
|
||||
exit_status = 1
|
||||
if self.__back_trace:
|
||||
# AssertionErrors are programming errors, hence a programmer should
|
||||
# get a chance to figure it out
|
||||
if self.__back_trace or isinstance(e, AssertionError):
|
||||
raise
|
||||
finally:
|
||||
if pr is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue