From: duplo Date: Sat, 25 Apr 2009 07:20:11 +0000 (+0000) Subject: Fix bug about inexistent directories X-Git-Tag: 2.1.0~15 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=5bd2e00f5d77f8354649b1a8c434de9cf44b7d25;p=bertos.git Fix bug about inexistent directories git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2667 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 00b687d7..ec52a210 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -55,8 +55,9 @@ def bertosVersion(directory): def createBertosProject(project_info): directory = project_info.info("PROJECT_PATH") sources_dir = project_info.info("SOURCES_PATH") - if not os.path.isdir(directory): - os.mkdir(directory) + if os.path.isdir(directory): + shutil.rmtree(directory, True) + os.makedirs(directory) f = open(directory + "/project.bertos", "w") f.write(pickle.dumps(project_info)) f.close()