GUI: exit with 1 when some conversion failed

Fixes: #318
This commit is contained in:
deeplow 2023-01-31 14:03:27 +00:00
parent 23ee60d3f3
commit 275df80484
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -111,8 +111,13 @@ class MainWindow(QtWidgets.QMainWindow):
ok_text="Abort conversions", ok_text="Abort conversions",
) )
converting_docs = self.dangerzone.get_converting_documents() converting_docs = self.dangerzone.get_converting_documents()
failed_docs = self.dangerzone.get_failed_documents()
if not converting_docs: if not converting_docs:
e.accept() e.accept()
if failed_docs:
self.dangerzone.app.exit(1)
else:
self.dangerzone.app.exit(0)
else: else:
accept_exit = alert_widget.exec_() accept_exit = alert_widget.exec_()
if not accept_exit: if not accept_exit:
@ -121,7 +126,7 @@ class MainWindow(QtWidgets.QMainWindow):
else: else:
e.accept() e.accept()
self.dangerzone.app.quit() self.dangerzone.app.exit(2)
class InstallContainerThread(QtCore.QThread): class InstallContainerThread(QtCore.QThread):