Patch submitted by Rasky.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 23 Mar 2010 15:44:25 +0000 (15:44 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 23 Mar 2010 15:44:25 +0000 (15:44 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3266 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos.py
wizard/exception_handler.py

index 05ecf7af3c927fab08717f255d356d0681fda27c..24d61e03ff14f1cf49201535889d6adffdfdbd99 100755 (executable)
@@ -119,6 +119,7 @@ def showStartPage():
     QApplication.instance().dialog.show()
 
 def main():
+    rundir = os.getcwd()
     os.chdir(os.path.dirname(os.path.abspath(sys.argv[0])))
     app = QApplication(sys.argv)
     app.settings = QSettings("Develer", "Bertos Configurator")
@@ -128,7 +129,7 @@ def main():
         os.system("rcc -binary bertos.qrc -o bertos.rcc")
     QResource.registerResource("bertos.rcc")
     if len(sys.argv) == 3 and sys.argv[1] == "--edit":
-        editProject(sys.argv[2])
+        editProject(os.path.join(rundir, sys.argv[2]))
     else:
         newProject()
  
index 1dc3405c6c75414232ce34523d1c6d942c8c65a4..9e54fa69825bb27e971f2c2875a69cc05f8c038f 100644 (file)
@@ -42,6 +42,8 @@ from PyQt4.QtGui import *
 \r
 def _excepthook(exc_type, exc_value, exc_traceback):\r
     project_dir = QApplication.instance().project.info("PROJECT_PATH")\r
+    if not project_dir:\r
+        project_dir = os.getcwd()\r
     file_name = os.path.join(project_dir, "wizard_error.log")\r
     if os.path.exists(file_name):\r
         content = open(file_name, "r").read()\r
@@ -55,6 +57,7 @@ def _excepthook(exc_type, exc_value, exc_traceback):
     f.write(">"*80 + "\n")\r
     f.write(content)\r
     f.close()\r
+    print>>sys.stderr, message\r
     QMessageBox.critical(\r
         None,\r
         "Exception occurred",\r