From: Camille GOUTTEBROZE Date: Fri, 5 Sep 2014 12:24:48 +0000 (+0200) Subject: More clever way to set BaseDir environment variable X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fcge%2Fmsvc10_porting;p=modules%2Fkernel.git More clever way to set BaseDir environment variable --- diff --git a/bin/nameserver.py b/bin/nameserver.py index ce1402ba7..2883701fd 100755 --- a/bin/nameserver.py +++ b/bin/nameserver.py @@ -25,6 +25,7 @@ import sys, os, re, socket #import commands from server import * +from salome_utils import getTmpDir from Utils_Identity import getShortHostName from launchConfigureParser import verbose @@ -39,12 +40,7 @@ class NamingServer(Server): LOGDIR="/tmp/logs/" + USER def initNSArgs(self): - if sys.platform == "win32": - # temporarily using home directory for Namning Service logs - # to be replaced with TEMP later... - os.environ["BaseDir"]=os.environ["HOME"] - else: - os.environ["BaseDir"]="/tmp" + os.environ['BaseDir'] = getTmpDir() try: os.mkdir(os.environ["BaseDir"] + "/logs")