1
0
Fork 0
mirror of synced 2024-05-18 19:42:54 +12:00

RareException: Use quit() instead of exit()

This commit is contained in:
loathingKernel 2023-12-25 22:11:06 +02:00
parent 2cbe6cadd9
commit 456050c91c
2 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ class RareException(RareAppException):
except Exception as e:
self.logger.fatal(str(e))
QMessageBox.warning(None, "Error", self.tr("Failed to login"))
QApplication.exit(1)
QApplication.quit()
return False

View file

@ -39,11 +39,11 @@ class RareAppException(QObject):
self.logger.fatal(message)
action = QMessageBox.warning(
None, exc_type.__name__, message,
buttons=QMessageBox.Ignore | QMessageBox.Close,
defaultButton=QMessageBox.Ignore
buttons=QMessageBox.Ignore | QMessageBox.Abort,
defaultButton=QMessageBox.Abort
)
if action == QMessageBox.RejectRole:
QApplication.exit(1)
if action == QMessageBox.Abort:
QApplication.quit()
class RareApp(QApplication):