phunt/zktop — pull request #9 by kwilczynski (2013-06-07 12:51:19+00:00)
Title: Make resetting remote ZooKeeper server stats more resilient.

This is to address the following problem:

Traceback (most recent call last):
File "/usr/lib/zktop/zktop.py", line 361, in
curses.wrapper(ui.show_ui)
File "/usr/lib/python2.6/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/zktop/zktop.py", line 297, in show_ui
[reset_server_stats(server) for server in self.servers]
File "/usr/lib/zktop/zktop.py", line 141, in reset_server_stats
send_cmd(host, port, "srst\n")
File "/usr/lib/zktop/zktop.py", line 110, in send_cmd
s.connect((host, int(port)))
File "", line 1, in connect
socket.error: [Errno 111] Connection refused

Which occurs when a ZooKeeper server is not available.

Signed-off-by: Krzysztof Wilczynski