From d6b0c8419468832e02ad894e98f15b5419195af7 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Fri, 13 Aug 2010 13:19:05 +0200 Subject: [PATCH] Use set.discard instead of set.remove --- kombu/transport/virtual.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kombu/transport/virtual.py b/kombu/transport/virtual.py index 1de62343..20d51120 100644 --- a/kombu/transport/virtual.py +++ b/kombu/transport/virtual.py @@ -309,10 +309,7 @@ class Transport(base.Transport): return channel def close_channel(self, channel): - try: - self._channels.remove(channel) - except KeyError: - pass + self._channels.discard(channel) def establish_connection(self): return self # for drain events