From 03467c2c276d9c49cc58403f103240e820640997 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 20 Apr 2010 16:14:44 +0000 Subject: [PATCH] Add method for version file git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3488 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BProject.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)) -- 2.25.1