From 5bd2e00f5d77f8354649b1a8c434de9cf44b7d25 Mon Sep 17 00:00:00 2001 From: duplo Date: Sat, 25 Apr 2009 07:20:11 +0000 Subject: [PATCH] Fix bug about inexistent directories git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2667 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/bertos_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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() -- 2.25.1