From: Christophe Bourcier Date: Wed, 13 Jul 2016 14:46:39 +0000 (+0200) Subject: Fix CEA 1868: python plugins MG-Cleaner and MG-SurfOpt does not launch when clicking... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1bbc40c54772e3114549698013068e16ccc9cb11;p=modules%2Fsmesh.git Fix CEA 1868: python plugins MG-Cleaner and MG-SurfOpt does not launch when clicking on compute Bug found after 7.8.0 tag. Code reported from master. --- diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py index e4030cc44..e10f673ef 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py @@ -84,12 +84,19 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog): f.write(cmds) f.close() + self.make_executable(nomFichier) + maBidouille=nomFichier self.monExe.start(maBidouille) self.monExe.closeWriteChannel() self.enregistreResultatsDone=False self.show() + def make_executable(self, path): + mode = os.stat(path).st_mode + mode |= (mode & 0o444) >> 2 # copy R bits to X + os.chmod(path, mode) + def saveFile(self): #recuperation du nom du fichier savedir=os.environ['HOME'] diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index 7d02228e4..b8c537452 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -68,12 +68,19 @@ class MonViewText(Ui_ViewExe, QDialog): f.write(cmds) f.close() + self.make_executable(nomFichier) + maBidouille=nomFichier self.monExe.start(maBidouille) self.monExe.closeWriteChannel() self.enregistreResultatsDone=False self.show() + def make_executable(self, path): + mode = os.stat(path).st_mode + mode |= (mode & 0o444) >> 2 # copy R bits to X + os.chmod(path, mode) + def saveFile(self): #recuperation du nom du fichier savedir=os.environ['HOME']