X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBFinalPage.py;h=020b5a58a61ed7eb3b6b1a42c49508c792a76d9b;hb=1560ea69dbd5da833d13fa0af9d9afbf70db5beb;hp=f5d353edfd4e200f90c6bc84afb3028860a35281;hpb=2be5d4598fdfee024f3929a110f5f93c751c355c;p=bertos.git diff --git a/wizard/BFinalPage.py b/wizard/BFinalPage.py index f5d353ed..020b5a58 100644 --- a/wizard/BFinalPage.py +++ b/wizard/BFinalPage.py @@ -54,14 +54,26 @@ class BFinalPage(BWizardPage): ## Overloaded BWizardPage methods ## def reloadData(self): + self.setVisible(False) """ Overload of the BWizardPage reloadData method. """ try: QApplication.instance().setOverrideCursor(Qt.WaitCursor) - bertos_utils.createBertosProject(self.project()) + 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("Error removing the destination directory. This directory or a file in it is in use by another user or application.\nClose the application which is using the directory and retry.")) + self.wizard().back() + return finally: QApplication.instance().restoreOverrideCursor() + self.setVisible(True) self._plugin_dict = {} if os.name == "nt": output = self.projectInfo("OUTPUT")