Add method for version file
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 20 Apr 2010 16:14:44 +0000 (16:14 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 20 Apr 2010 16:14:44 +0000 (16:14 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3488 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BProject.py

index 70b872eee3c0c2da82a4472ffc3677f08d3f9de3..3d8d579ee77872fb2c8451841fd71cb35e112486 100644 (file)
@@ -274,8 +274,7 @@ class BProject(object):
         # Write the project file
         self._writeProjectFile(directory + "/project.bertos")
         # VERSION file
-        version_file = open(os.path.join(const.DATA_DIR, "vtemplates/VERSION"), "r").read()
-        open(directory + "/VERSION", "w").write(versionFileGenerator(self, version_file))
+        self._writeVersionFile(directory + "/VERSION")
         # Destination source dir
         srcdir = directory + "/bertos"
         if not edit:
@@ -317,6 +316,10 @@ class BProject(object):
             relevants_files[plugin] = module.createProject(self)
         self.infos["RELEVANT_FILES"] = relevants_files
 
+    def _writeVersionFile(self, filename):
+        version_file = open(os.path.join(const.DATA_DIR, "vtemplates/VERSION"), "r").read()
+        open(filename, "w").write(versionFileGenerator(self, version_file))
+
     def _writeProjectFile(self, filename):
         f = open(filename, "w")
         f.write(projectFileGenerator(self))