chiark / gitweb /
svc/connect.in (Pinger.kill): Don't assume the peer exists.
[tripe] / svc / connect.in
index e3a5022331c1f1eaa8c4f880dc238c90a31ea433..feb79ea8ef005e155b67037cc02d090592331c6d 100644 (file)
@@ -528,7 +528,8 @@ class Pinger (T.Coroutine):
 
   def kill(me, peername):
     """Remove PEER from the peers being watched by the Pinger."""
-    del me._peers[peername]
+    try: del me._peers[peername]
+    except KeyError: pass
     return me
 
   def rescan(me, startup):