]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: HOSTNAME not always defined
authorprascle <prascle>
Wed, 16 Nov 2005 00:00:18 +0000 (00:00 +0000)
committerprascle <prascle>
Wed, 16 Nov 2005 00:00:18 +0000 (00:00 +0000)
bin/killSalomeWithPort.py

index 7cc60a73dfd84f9e972afd36abfd4554cdde6b66..404c9ef8f56f517c0b83f7e888c8fdfc8bb4970f 100755 (executable)
@@ -2,6 +2,14 @@
 import os, sys, pickle, signal, commands
 
 def getPiDict(port,appname='salome',full=True):
+    from Utils_Identity import getShortHostName
+    
+    if os.getenv("HOSTNAME") == None:
+        if os.getenv("HOST") == None:
+            os.environ["HOSTNAME"]=getShortHostName()
+        else:
+            os.environ["HOSTNAME"]=os.getenv("HOST")
+
     filedict = []
     filedict.append( os.getenv('USER') )          # user name
     filedict.append( os.getenv('HOSTNAME') )      # host name