- if version != current_version:
- if QMessageBox.question(
- dialog.version_page,
- self.tr("BeRTOS version update"),
- self.tr("Changing the BeRTOS version will destroy all the modification done on the BeRTOS sources"),
- QMessageBox.Ok | QMessageBox.Cancel
- ) == QMessageBox.Ok:
- qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
+ if QMessageBox.question(
+ dialog.version_page,
+ self.tr("BeRTOS version update"),
+ self.tr("Changing the BeRTOS version will destroy all the modification done on the BeRTOS sources"),
+ QMessageBox.Ok | QMessageBox.Cancel
+ ) == QMessageBox.Ok:
+ try:
+ qApp.setOverrideCursor(QCursor(Qt.WaitCursor))