"""
Overload of the BWizardPage reloadData method.
"""
- QApplication.instance().setOverrideCursor(Qt.WaitCursor)
- bertos_utils.createBertosProject(self.project())
- QApplication.instance().restoreOverrideCursor()
+ try:
+ QApplication.instance().setOverrideCursor(Qt.WaitCursor)
+ try:
+ # This operation can throw WindowsError, if the directory is
+ # locked.
+ self.project.createBertosProject()
+ except OSError, e:
+ QMessageBox.critical(self, self.tr("Error removing destination directory"), self.tr("Close all the application using this directory and retry."))
+ self.wizard().back()
+ return
+ finally:
+ QApplication.instance().restoreOverrideCursor()
self._plugin_dict = {}
if os.name == "nt":
output = self.projectInfo("OUTPUT")