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.
This commit is contained in:
Christophe Bourcier 2016-07-13 16:46:39 +02:00
parent 08a7d4d04e
commit 1bbc40c547
2 changed files with 14 additions and 0 deletions

View File

@ -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']

View File

@ -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']