From f7550b92e7b48573d62c3fbf43a95ecc2305257a Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 11 Jul 2007 19:50:06 +0000 Subject: [PATCH] actuall delete the host from the table --- hbd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbd b/hbd index 18988e0..45c9174 100755 --- a/hbd +++ b/hbd @@ -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