]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for bos #18341: HOME environment variable jfa/18341_HOME
authorjfa <jfa@opencascade.com>
Tue, 14 Apr 2020 08:47:24 +0000 (11:47 +0300)
committerjfa <jfa@opencascade.com>
Tue, 14 Apr 2020 08:47:24 +0000 (11:47 +0300)
src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py
src/Tools/MGCleanerPlug/MGCleanerMonViewText.py
src/Tools/Verima/Base/versions.py
src/Tools/Verima/Stats/job.py
src/Tools/YamsPlug/monViewText.py
src/Tools/YamsPlug/monYamsPlugDialog.py

index 470cadbfeae26aa4c366d9f6be2ce2595ed70e41..f175090b4f073fea45c13d6566b7046dad6b7c7c 100644 (file)
@@ -69,7 +69,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     self.PB_MeshFile.setToolTip("source mesh from a file in disk")
 
     #Ces parametres ne sont pas remis a rien par le clean
-    self.paramsFile= os.path.abspath(os.path.join(os.environ["HOME"],".MGCleaner.dat"))
+    self.paramsFile= os.path.abspath(os.path.join(os.path.expanduser("~"),".MGCleaner.dat"))
     self.LE_ParamsFile.setText(self.paramsFile)
     self.LE_MeshFile.setText("")
     self.LE_MeshSmesh.setText("")
index 9458af6c216bc919ce923e7c808b57df4959fe49..397948ff6804343d56773fb032af73a3609c42d5 100644 (file)
@@ -81,7 +81,7 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog):
 
     def saveFile(self):
         #recuperation du nom du fichier
-        savedir=os.environ['HOME']
+        savedir=os.path.expanduser("~")
         fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir)
         if not fn: return
         ulfile = os.path.abspath(str(fn))
index 111a2ba0f316e9ff9ec8747a169798018c93f198..67917588a4ced421edce79475fc81fcd3d052eed 100755 (executable)
@@ -24,7 +24,7 @@ import  subprocess
 
 
 def Chercheversion(salomePath):
-    home=os.environ['HOME']
+    home=os.path.expanduser("~")
     commande=os.path.abspath(os.path.join(home,salomePath,'salome'))
     argus="--version"
     p = subprocess.Popen([commande,argus], stdout=subprocess.PIPE)
index e1f610b2640ee4526bebd5c93aadeee7f103daaa..bca83604d4c84c71a00b8edb522f13a419feb3ed 100644 (file)
@@ -36,7 +36,7 @@ class Job:
 
       
   def execute(self):
-      home=os.environ['HOME']
+      home=os.path.expanduser("~")
       commande=os.path.abspath(os.path.join(home,self.salomePath,"salome"))
       script= os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',self.script)) 
 
index cb140d87f4406e2f640361954bde8dfa2160bf5f..6ca6fbe7d044226036c85c7baa45df8117ed50ff 100644 (file)
@@ -80,7 +80,7 @@ class MonViewText(Ui_ViewExe, QDialog):
 
     def saveFile(self):
         #recuperation du nom du fichier
-        savedir=os.environ['HOME']
+        savedir=os.path.expanduser("~")
         fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir)
         if not fn: return
         ulfile = os.path.abspath(str(fn))
index 297b7061a3e3eaaf23692ce3d0a1e5660355603b..88efdc1b920f21c45d1be292624688fd8c06f65f 100644 (file)
@@ -69,7 +69,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     self.PB_MeshFile.setToolTip("source mesh from a file in disk")
 
     #Ces parametres ne sont pas remis a rien par le clean
-    self.paramsFile= os.path.abspath(os.path.join(os.environ["HOME"],".MGSurfOpt.dat"))
+    self.paramsFile= os.path.abspath(os.path.join(os.path.expanduser("~"),".MGSurfOpt.dat"))
     self.LE_ParamsFile.setText(self.paramsFile)
     self.LE_MeshFile.setText("")
     self.LE_MeshSmesh.setText("")