Create project dir if does not exist.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 9 Sep 2009 14:37:43 +0000 (14:37 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 9 Sep 2009 14:37:43 +0000 (14:37 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2912 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/exception_handler.py

index ae3b82f5eee8c1970a06a134920d10b8b11176e8..1dc3405c6c75414232ce34523d1c6d942c8c65a4 100644 (file)
@@ -47,6 +47,8 @@ def _excepthook(exc_type, exc_value, exc_traceback):
         content = open(file_name, "r").read()\r
     else:\r
         content = ""\r
+        if not os.path.exists(os.path.dirname(file_name)):\r
+            os.makedirs(os.path.dirname(file_name))\r
     f = open(file_name, "w")\r
     message = "\n".join(traceback.format_exception(exc_type, exc_value, exc_traceback))\r
     f.write(message)\r