From d21ca1a193e8b558d048c271b7722259725f0c39 Mon Sep 17 00:00:00 2001 From: Camille GOUTTEBROZE Date: Fri, 5 Sep 2014 14:24:48 +0200 Subject: [PATCH] More clever way to set BaseDir environment variable --- bin/nameserver.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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") -- 2.39.2