From ab5c9122bd5425203232914b36178c08378d92e0 Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Sat, 21 Jun 2008 12:59:21 -0700 Subject: [PATCH] Consume ping errors so they aren't printed in the log. --- apt_p2p_Khashmir/khashmir.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apt_p2p_Khashmir/khashmir.py b/apt_p2p_Khashmir/khashmir.py index f711a6a..13bfb5a 100644 --- a/apt_p2p_Khashmir/khashmir.py +++ b/apt_p2p_Khashmir/khashmir.py @@ -288,7 +288,11 @@ class KhashmirBase(protocol.Factory): """Error occurred, fail node.""" log.msg("action ping failed on %s/%s: %s" % (node.host, node.port, err.getErrorMessage())) self.stats.completedAction('ping', start) + + # Consume unhandled errors + self.pinging[node.id].addErrback(lambda ping_err: None) del self.pinging[node.id] + self.nodeFailed(node) return err -- 2.39.5