Skip to contentSkip to conversation

daemonize: Always print any remaning UI events at exit

PATCH New Richard Purdie 1 participant 1 message Aug 3, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 daemonize: Always print any remaning UI events at exit

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.

---
 lib/bb/daemonize.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/daemonize.py +1 -1
index a5a9d86..8300d1d 100644
@@ -77,6 +77,6 @@ def createDaemon(function, logfile):
         function()
     except Exception as e:
         traceback.print_exc()
-        bb.event.print_ui_queue()
     finally:
+        bb.event.print_ui_queue()
         os._exit(0)
Signature · 1 line
2.7.4