From: rnv Date: Mon, 18 Nov 2019 12:24:42 +0000 (+0300) Subject: Small fix for '#17662 [CEA] hostname and SALOME' issue. X-Git-Tag: V9_4_0rc2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9c941f58f6f8777d7ff485cdcb9cceb38c27f12a;p=modules%2Fkernel.git Small fix for '#17662 [CEA] hostname and SALOME' issue. --- diff --git a/bin/nameserver.py b/bin/nameserver.py index 257969892..ed5664ec4 100644 --- a/bin/nameserver.py +++ b/bin/nameserver.py @@ -90,7 +90,11 @@ class NamingServer(Server): # get ip address on default interface (for instance eth0) to limit listening on this interface (cyber security request) from subprocess import check_output ips = check_output(['hostname', '--all-ip-addresses']) - ipDefault = ips.split()[0].decode() + if ips.strip(): + ipDefault = ips.split()[0].decode() + else: + ip = check_output(['hostname', '--ip-address']) + ipDefault = ip.split()[-1].decode() self.CMD = ['omniNames','-start' , aPort] self.CMD += ['-logdir' , upath, '-errlog', upath+'/omniNameErrors.log'] self.CMD += ['-ORBendPoint', 'giop:tcp:%s:%s'%(hname,aPort)]