From dea84d63509d933578a2e47574f66df97df6081d Mon Sep 17 00:00:00 2001 From: prascle Date: Wed, 16 Nov 2005 00:00:18 +0000 Subject: [PATCH] PR: HOSTNAME not always defined --- bin/killSalomeWithPort.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.39.2