X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FYamsPlug%2FmonYamsPlugDialog.py;h=37a15f6cc591b6ded93d34d83430cbd8253c8c4c;hp=3fa65e55796181fb633a6000b9104cce16c1403d;hb=c445ce74d816a2f89830ef0527a7ef9e76144c5e;hpb=cf38d693404669f727c1f37ef95eccf830634f05 diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index 3fa65e557..37a15f6cc 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2014 EDF R&D +# Copyright (C) 2007-2016 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,6 +22,7 @@ # Modules Eficas import os, subprocess +import tempfile from YamsPlugDialog_ui import Ui_YamsPlugDialog from monViewText import MonViewText from PyQt4.QtGui import * @@ -430,7 +431,9 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): self.fichierIn="" def prepareFichier(self): - self.fichierIn="/tmp/ForSurfOpt_"+str(self.num)+".meshb" + self.fichierIn=tempfile.mktemp(suffix=".meshb",prefix="ForSurfOpt_") + if os.path.exists(self.fichierIn): + os.remove(self.fichierIn) self.__selectedMesh.ExportGMF(self.__selectedMesh, self.fichierIn, True) def PrepareLigneCommande(self):