Salome HOME
Fixed problem with dump study and small optimization:
[modules/kernel.git] / bin / appliskel / kill_remote_containers.py
index f6b9a7b73801a005a374028dd59b80ffee1d3d79..06bcffb4a418b649b8ac9f252fc8c4752e38d319 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #  -*- coding: utf-8 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -26,6 +26,7 @@
 """
 import sys,os,shutil,glob,socket
 import optparse
+from salome_utils import getUserName
 
 import getAppliPath
 appli_local=os.path.realpath(os.path.dirname(__file__))
@@ -90,7 +91,7 @@ class Resource:
   def get_user(self):
     userName= self.node.get("userName")
     if not userName:
-      userName=os.getenv('USER')
+      userName=getUserName()
     return userName
 
   def get_host(self):
@@ -110,7 +111,7 @@ class Resource:
 
 def main():
   parser = optparse.OptionParser(usage=usage)
-  parser.add_option('-p','--port', dest="port", 
+  parser.add_option('-p','--port', dest="port",
                             help="The SALOME session port (default NSPORT or 2810)")