X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fexception_handler.py;h=1dc3405c6c75414232ce34523d1c6d942c8c65a4;hb=b284d6d7f4a218edab54dc0f8eb4f734a3f22b8a;hp=ae3b82f5eee8c1970a06a134920d10b8b11176e8;hpb=680617324b88f51858e9de9652679d268cf90be4;p=bertos.git 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)