Reformat error messages.
[bertos.git] / wizard / bertos.py
index ce6bd30f2970f54904a220b8ea4982cc9466d4d1..f04c16f639c163f9ac2a410b9464891fe0ec98c6 100755 (executable)
@@ -85,24 +85,26 @@ def newProject():
 def editProject(project_file):
     info_dict = {}
     while(True):
+        # Empty project is the default fallback.
+        QApplication.instance().project = BProject()
         try:
             QApplication.instance().project = BProject(project_file, info_dict)
         except VersionException:
             QMessageBox.critical(
                 None,
                 QObject().tr("BeRTOS version not found!"),
-                QObject().tr("The selected BeRTOS version is not found, please select an existing one...")
+                QObject().tr("The selected BeRTOS version was not found, please select another one...")
             )
             dialog = BVersionDialog()
             if dialog.exec_():
                 version = dialog.version_page.currentVersion()
-                info_dict["SOURCES_PATH"] = version
+                info_dict["BERTOS_PATH"] = version
             continue
         except ToolchainException, exc:
             QMessageBox.critical(
                 None,
                 QObject().tr("Toolchain not found!"),
-                QObject().tr("The selected toolchain is not found, please select an existing one...")
+                QObject().tr("The selected toolchain was not found, please select another one...")
             )
             QApplication.instance().project = exc.partial_project
             dialog = BToolchainDialog()