From f7706074a206be7281cfc078a766ecc49254bed6 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 4 Aug 2018 18:10:31 -0400 Subject: [PATCH] Drop needless if check --- tractor/_actor.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tractor/_actor.py b/tractor/_actor.py index d530db3..7693035 100644 --- a/tractor/_actor.py +++ b/tractor/_actor.py @@ -282,10 +282,8 @@ class Actor: if msg is None: # terminate sentinel log.debug( f"Cancelling all tasks for {chan} from {chan.uid}") - scopes = self._rpc_tasks.pop(chan, None) - if scopes: - for scope, func in scopes: - scope.cancel() + for scope, func in self._rpc_tasks.pop(chan, ()): + scope.cancel() log.debug( f"Msg loop signalled to terminate for"