actuall delete the host from the table

This commit is contained in:
andreas
2007-07-11 19:50:06 +00:00
parent 6d3ccd0b4c
commit f7550b92e7
+3 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# $Id: hbd,v 1.16 2007/04/05 15:51:13 andreas Exp $
# $Id: hbd,v 1.17 2007/07/11 19:50:06 andreas Exp $
# Wait for heartbeat messages and act on them (or their absence)
#
import time, os, string, sys, socket, atexit, select, SocketServer, getopt, signal, cPickle
@@ -266,7 +266,8 @@ def fromaddr(name, addr, boot, interval):
host=hosts[name]
if host.addr != addr:
log("%s changed address to %s" % (host.name, addr))
del htab[host.addr]
if htab.has_key(host.addr):
del htab[host.addr]
host.addr=addr
htab[addr]=name