From 885a328caa001ff223ac1e7f27bb6b6906228244 Mon Sep 17 00:00:00 2001 From: batt Date: Wed, 9 Sep 2009 14:37:43 +0000 Subject: [PATCH] Create project dir if does not exist. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2912 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/exception_handler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wizard/exception_handler.py b/wizard/exception_handler.py index ae3b82f5..1dc3405c 100644 --- a/wizard/exception_handler.py +++ b/wizard/exception_handler.py @@ -47,6 +47,8 @@ def _excepthook(exc_type, exc_value, exc_traceback): content = open(file_name, "r").read() else: content = "" + if not os.path.exists(os.path.dirname(file_name)): + os.makedirs(os.path.dirname(file_name)) f = open(file_name, "w") message = "\n".join(traceback.format_exception(exc_type, exc_value, exc_traceback)) f.write(message) -- 2.25.1