Salome HOME
Integration of [CEA 13233] support new xdr.h location
[modules/kernel.git] / bin / nameserver.py
old mode 100755 (executable)
new mode 100644 (file)
index 9000341..e20cd2f
@@ -1,6 +1,5 @@
-#!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -25,7 +24,7 @@
 import os, sys, re, socket
 #import commands
 from server import Server
-from Utils_Identity import getShortHostName
+from salome_utils import getHostName
 from launchConfigureParser import verbose
 
 # -----------------------------------------------------------------------------
@@ -46,13 +45,8 @@ class NamingServer(Server):
         except:
             pass
 
-        if verbose(): print("Name Service... ", end=' ')
-        #hname=os.environ["HOST"] #commands.getoutput("hostname")
-        if sys.platform == "win32":
-          hname = getShortHostName();
-        else:
-          hname = socket.gethostname();
-        # print("hname=",hname)
+        if verbose(): print("Name Service... ", end =' ')
+        hname = getHostName()
 
         with open(os.environ["OMNIORB_CONFIG"]) as f:
           ss = re.findall("NameService=corbaname::" + hname + ":\d+", f.read())