Prevent multiple calls to tagger.exit()

When Picard is stopped by signal (ie. CTRL-C from linux command line), exit() may be called more than once.
This commit is contained in:
Laurent Monin
2018-02-08 01:04:40 +01:00
parent 3e96089617
commit cbc989d00e

View File

@@ -278,8 +278,10 @@ class Tagger(QtWidgets.QApplication):
self.nats.update()
def exit(self):
log.debug("Picard stopping")
if self.stopping:
return
self.stopping = True
log.debug("Picard stopping")
self._acoustid.done()
self.thread_pool.waitForDone()
self.save_thread_pool.waitForDone()