From: duplo Date: Tue, 20 Apr 2010 16:14:44 +0000 (+0000) Subject: Add method for version file X-Git-Tag: 2.5.0~420 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=03467c2c276d9c49cc58403f103240e820640997;p=bertos.git Add method for version file git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3488 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BProject.py b/wizard/BProject.py index 70b872ee..3d8d579e 100644 --- a/wizard/BProject.py +++ b/wizard/BProject.py @@ -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))