self.tree.racine.item.getObject().nom=os.path.basename(newName)
self.tree.racine.update_node_label()
- if self.jdc.isvalid() != 0 :
- try:
- self.generator.writeDefault(fn)
- except:
- pass
+ if self.jdc.isvalid() != 0 and hasattr(self.generator, "writeDefault"):
+ self.generator.writeDefault(fn)
if self.salome :
self.appliEficas.addJdcInSalome( self.fichier)
def writeDefault(self, fn):
fileSTD = fn[:fn.rfind(".")] + '.py'
- f = open( str(filename), 'wb')
+ f = open( str(fileSTD), 'wb')
f.write( self.texteSTD )
f.close()
self.wrapperXML=None
def writeDefault(self, filename):
- fileXML = fn[:fn.rfind(".")] + '.xml'
- self.wrapperXML.writeFile( fileXML )
-
+ fileXML = filename[:filename.rfind(".")] + '.xml'
+ self.wrapperXML.writeFile( str(fileXML) )