From 7b61ce4001bdbc595feb58139318d9f90153b15a Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Fri, 25 Jul 2014 11:41:54 +0200 Subject: [PATCH] Update connection.py Use `is_connection` function instead of duplicating code. --- kombu/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kombu/connection.py b/kombu/connection.py index 54512852..831c864c 100644 --- a/kombu/connection.py +++ b/kombu/connection.py @@ -1050,7 +1050,7 @@ class ChannelPool(Resource): def maybe_channel(channel): """Return the default channel if argument is a connection instance, otherwise just return the channel given.""" - if isinstance(channel, Connection): + if is_connection(channel): return channel.default_channel return channel