From: duplo Date: Mon, 26 Apr 2010 15:37:51 +0000 (+0000) Subject: Avoid to create a new VERSION file for presets, in editing mode. X-Git-Tag: 2.5.0~390 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d8979f17edab77a659c31787e3b6002e76bd81e3;p=bertos.git Avoid to create a new VERSION file for presets, in editing mode. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3518 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BProject.py b/wizard/BProject.py index 36fbd5c4..666fd352 100644 --- a/wizard/BProject.py +++ b/wizard/BProject.py @@ -107,7 +107,7 @@ class BProject(object): self.infos["PRESET"] = project_data.get("PRESET", False) # For those projects that don't have a VERSION file create a dummy one. - if not isBertosDir(project_dir): + if not isBertosDir(project_dir) and not self.is_preset: version_file = open(os.path.join(const.DATA_DIR, "vtemplates/VERSION"), "r").read() open(os.path.join(project_dir, "VERSION"), "w").write(version_file.replace("$version", "").strip())