]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
#17872 [CEA] /tmp/.salome_PortManager.lock permission denied (attempt 3) vsr/17872
authorvsr <vsr@opencascade.com>
Thu, 24 Oct 2019 13:13:45 +0000 (16:13 +0300)
committervsr <vsr@opencascade.com>
Thu, 24 Oct 2019 13:13:45 +0000 (16:13 +0300)
bin/PortManager.py

index 0b8dd94c1ff79654328f583d1c518bb57572a481..a00d49304516f0ac4f8aab2aa69fd656329d8d2d 100644 (file)
@@ -82,7 +82,14 @@ def _getConfigurationFilename():
                                         hidden=True)
   import tempfile
   temp = tempfile.NamedTemporaryFile()
-  lock_file = os.path.join(os.path.dirname(temp.name), ".salome_PortManager.lock")
+  lock_file = os.path.join(os.path.dirname(temp.name), ".salome", ".PortManager.lock")
+  try:
+    oldmask = os.umask(0)
+    os.makedirs(os.path.dirname(lock_file))
+  except IOError:
+    pass
+  finally:
+    os.umask(oldmask)
   temp.close()
 
   return (portmanager_config, lock_file)