report exceptions via exit code

Now it is possible to handle failed syncs in scripts.

Signed-off-by: Alex Kapranoff <alex@kapranoff.ru>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Alex Kapranoff 2015-05-05 16:34:58 +03:00 committed by Nicolas Sebrecht
parent 548fa6e57f
commit a817400d76

View File

@ -500,6 +500,8 @@ class UIBase(object):
#print any exceptions that have occurred over the run
if not self.exc_queue.empty():
self.warn("ERROR: Exceptions occurred during the run!")
if exitstatus == 0:
exitstatus = 1
while not self.exc_queue.empty():
msg, exc, exc_traceback = self.exc_queue.get()
if msg: