Wrong logic printing the trace in Autosubmit exceptions
Another one from !395 (merged), while reviewing our code.
If we have an AutosubmitCritical
error, the code handles when the error includes trace
information. But the logic is incorrect. It only prints the trace when a) the trace is not present, or the trace is empty.
The second part, I believe, must be a is not empty. Otherwise we end up with messages like this:
(The yellow part is a Log.error
call with nothing after the trace, as it is empty. The red part is another separate call to Log.critical
.)
Easy to fix, but must we must check if it happens elsewhere in our code, and include a basic unit test (doesn't look difficult to cover with pytest/unittest).