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