If there are events in the UI queue we want to print them regardless of
whether we're handling an exception or something like SystemExit.
This improves error messages for some other failure cases where currently
no logging would get printed and leave the user confused as to what went
wrong.
(Bitbake rev: 76c4f2c20216719736766e8ae7d089ccd061b71b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>