From: prascle Date: Wed, 16 Nov 2005 00:00:18 +0000 (+0000) Subject: PR: HOSTNAME not always defined X-Git-Tag: V3_1_0a3~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dea84d63509d933578a2e47574f66df97df6081d;p=modules%2Fkernel.git PR: HOSTNAME not always defined --- diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index 7cc60a73d..404c9ef8f 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -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