Permalink
Browse files

Make sure that command line option --host is honored.

  • Loading branch information...
1 parent 37da7d3 commit 96271ecfa9ab83398d0b6570ab498817b490cdca Baoqiu Cui committed Oct 13, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/agent/sin_agent.py
@@ -501,9 +501,11 @@ def handle_signal(signum, stackframe):
nodes = cluster_client.get_registered_nodes()
if nodes.get(node_id):
node = nodes[node_id]
- host = socket.gethostbyaddr(socket.gethostname())[0]
+ host = None
if options.host != "":
host = options.host
+ else:
+ host = socket.gethostbyaddr(socket.gethostname())[0]
hosts_a = set(socket.gethostbyname_ex(node.get_host())[2])
hosts_b = set(socket.gethostbyname_ex(host)[2])
if not [h for h in hosts_b if not h.startswith('127.')]:

0 comments on commit 96271ec

Please sign in to comment.