X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos_utils.py;h=ec52a21050acd81b7d341fd2ba8f69c069724b49;hb=c9d1a7e9cc28f4d94fff284a4ca09a23f8eea855;hp=2bc44ab54d0fa385fc55964860925466a97c448f;hpb=df3bd7f742da8c015304fa21e01eb966ff76a089;p=bertos.git diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 2bc44ab5..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() @@ -228,7 +229,7 @@ def csrcGenerator(project_info): cppasrc = " \\\n\t".join(cppasrc) + " \\" cxxsrc = " \\\n\t".join(cxxsrc) + " \\" asrc = " \\\n\t".join(asrc) + " \\" - constants = "\n".join([os.path.basename(project_info.info("PROJECT_PATH")) + "_" + key + " = " + str(value) for key, value in constants.items()]) + constants = "\n".join([os.path.basename(project_info.info("PROJECT_PATH")) + "_" + key + " = " + unicode(value) for key, value in constants.items()]) return csrc, pcsrc, cppasrc, cxxsrc, asrc, constants def findModuleFiles(module, project_info):