]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PAL10873: Debian: HOSTNAME settings. Update fix in accordance with modifications... T_2_2_7pre2 V2_2_7
authorjfa <jfa@opencascade.com>
Tue, 13 Dec 2005 14:34:32 +0000 (14:34 +0000)
committerjfa <jfa@opencascade.com>
Tue, 13 Dec 2005 14:34:32 +0000 (14:34 +0000)
bin/killSalomeWithPort.py

index bb71dc2f60f69707c21460df58b6870c05a454a3..951b66bb6fa83ab4120a7e1578578b6d196ca8e7 100755 (executable)
@@ -4,15 +4,15 @@ 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")
+    host = os.getenv("HOSTNAME")
+    if not host:
+        host = os.getenv("HOST")
+    if not host:
+        host = getShortHostName()
 
     filedict = []
     filedict.append( os.getenv('USER') )          # user name
-    filedict.append( os.getenv('HOSTNAME') )      # host name
+    filedict.append( host )                       # host name
     filedict.append( str(port) )                  # port number
     filedict.append( appname.upper() )            # application name
     filedict.append( 'pidict' )                   # constant part