Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Compilation under Windows: add missing header
[modules/kernel.git]
/
bin
/
nameserver.py
diff --git
a/bin/nameserver.py
b/bin/nameserver.py
index 25796989200446f3ef2699d27d00bbb484b7c732..58982b877103fa7bb7f179d6eb9524534aa4d7f6 100644
(file)
--- a/
bin/nameserver.py
+++ b/
bin/nameserver.py
@@
-1,5
+1,5
@@
# -*- coding: iso-8859-1 -*-
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-20
19
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-20
21
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
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-90,10
+90,13
@@
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'])
# 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 = ['omniNames','-start' , aPort]
self.CMD += ['-logdir' , upath, '-errlog', upath+'/omniNameErrors.log']
- self.CMD += ['-ORBendPoint', 'giop:tcp:%s:%s'%(hname,aPort)]
if verbose(): print("... ok")
if verbose(): print("to list contexts and objects bound into the context with the specified name : showNS ")
if verbose(): print("... ok")
if verbose(): print("to list contexts and objects bound into the context with the specified name : showNS ")