Avoid to create a new VERSION file for presets, in editing mode.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 26 Apr 2010 15:37:51 +0000 (15:37 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 26 Apr 2010 15:37:51 +0000 (15:37 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3518 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BProject.py

index 36fbd5c40e9002e33dd22531508cdcea3668ffaa..666fd352be30172022b9865154100b38ef9e1a15 100644 (file)
@@ -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())