Always call ui.terminate()

I discovered that we do not run ui.terminate in all circumstances, so
make sure that we call with properly at the end of each run (whether in
threaded or single-thread mode).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-06-14 11:52:05 +02:00 committed by Nicolas Sebrecht
parent 335b320d9a
commit 8634b0030d

View File

@ -343,6 +343,7 @@ class OfflineImap:
t.start()
threadutil.exitnotifymonitorloop(threadutil.threadexited)
ui.terminate()
except KeyboardInterrupt:
ui.terminate(1, errormsg = 'CTRL-C pressed, aborting...')
return