[Modeling-cvs] ProjectModeling/Modeling/ModelMasons PyModelMason.py,1.9,1.10
Status: Abandoned
Brought to you by:
sbigaret
From: <sbi...@us...> - 2003-05-27 17:03:59
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/ModelMasons In directory sc8-pr-cvs1:/tmp/cvs-serv27194/ModelMasons Modified Files: PyModelMason.py Log Message: Fixed log() msgs not making the difference between creating and overwriting a xml-model file Index: PyModelMason.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/ModelMasons/PyModelMason.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PyModelMason.py 26 May 2003 15:44:48 -0000 1.9 --- PyModelMason.py 27 May 2003 17:03:57 -0000 1.10 *************** *** 161,166 **** #----------------------------------------------------------------- def create_model_files(self, xml_path, py_path): # model_<modelName>.xml ! self.log('Generating %s'%xml_path) if not self.fake_mode: self.model.saveModelAsXMLFile(xml_path) --- 161,170 ---- #----------------------------------------------------------------- def create_model_files(self, xml_path, py_path): + "Creates or overwrite the model (.xml and .py)" # model_<modelName>.xml ! if os.path.exists(xml_path): ! self.log('Overwriting %s'%xml_path) ! else: ! self.log('Generating %s'%xml_path) if not self.fake_mode: self.model.saveModelAsXMLFile(xml_path) *************** *** 218,223 **** try: os.mkdir(basePath) ! except: self.log('no\n') ! else: self.log('ok\n') self.createFileFromTemplate(init_base.init_base(), os.path.join(self.base_dir,"__init__.py"), --- 222,228 ---- try: os.mkdir(basePath) ! except: self.log('no') ! else: self.log('ok') ! self.log('\n') self.createFileFromTemplate(init_base.init_base(), os.path.join(self.base_dir,"__init__.py"), |