From 3dc57e384efa826162cd28d3f7362f80aa66cde5 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 15 Sep 2023 14:20:12 -0400 Subject: [PATCH] Always no-raise try-to-pop registry addrs --- tractor/_runtime.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tractor/_runtime.py b/tractor/_runtime.py index 67bb0c5..143772d 100644 --- a/tractor/_runtime.py +++ b/tractor/_runtime.py @@ -1879,8 +1879,16 @@ class Arbiter(Actor): sockaddr: tuple[str, int], ) -> tuple[str, str]: - uid: tuple = self._registry.inverse.pop(sockaddr) - log.warning( - f'Deleting registry entry for {sockaddr}@{uid}!' + uid: tuple | None = self._registry.inverse.pop( + sockaddr, + None, ) + if uid: + log.warning( + f'Deleting registry entry for {sockaddr}@{uid}!' + ) + else: + log.warning( + f'No registry entry for {sockaddr}@{uid}!' + ) return uid