svc/connect.in: Change the idiom for handling peer nonexistence.
[tripe] / svc / connect.in
index cb64000..cec1e3f 100644 (file)
@@ -757,12 +757,12 @@ def notify(_, code, *rest):
   """
   if code == 'ADD':
     try: p = Peer(rest[0])
-    except KeyError: return
-    adoptpeer(p, *rest[1:])
+    except KeyError: pass
+    else: adoptpeer(p, *rest[1:])
   elif code == 'KILL':
     try: p = Peer(rest[0])
-    except KeyError: return
-    disownpeer(p, *rest[1:])
+    except KeyError: pass
+    else: disownpeer(p, *rest[1:])
   elif code == 'GREET':
     chal = rest[0]
     try: cr = chalmap[chal]